2024-07-16 Unity插件 Odin Inspector6 —— Group Attributes

news2024/11/24 6:57:17

文章目录

  • 1 说明
  • 2 Group 特性
    • 2.1 BoxGroup
    • 2.2 ButtonGroup
    • 2.3 FoldoutGroup
    • 2.4 ShowIfGroup / HideIfGroup
    • 2.5 HorizontalGroup
    • 2.6 ResponsiveButtonGroup
    • 2.7 TabGroup
    • 2.8 ToggleGroup
    • 2.9 VerticalGroup

1 说明

​ 本文介绍 Odin Inspector 插件中有关 Group 特性的使用方法。

2 Group 特性

2.1 BoxGroup

绘制按钮组。

  • string group

    按钮组名称。

  • bool showLabel = true

    是否显示标题。

  • bool centerLabel = false

    标题是否居中。

  • float order = 0.0f

    按钮组的排序。

image-20240716034040374
// BoxGroupExamplesComponent.cs

using Sirenix.OdinInspector;
using System;
using UnityEngine;

public class BoxGroupExamplesComponent : MonoBehaviour
{
    // Box with a title.
    [BoxGroup("Some Title")]
    public string A;

    [BoxGroup("Some Title")]
    public string B;

    // Box with a centered title.
    [BoxGroup("Centered Title", centerLabel: true)]
    public string C;

    [BoxGroup("Centered Title")]
    public string D;

    // Box with a title received from a field.
    [BoxGroup("$G")]
    public string E = "Dynamic box title 2";

    [BoxGroup("$G")]
    public string F;

    // No title
    [BoxGroup]
    public string G;

    [BoxGroup]
    public string H;

    // A named box group without a title.
    [BoxGroup("NoTitle", false)]
    public string I;

    [BoxGroup("NoTitle")]
    public string J;

    [BoxGroup("A Struct In A Box"), HideLabel]
    public SomeStruct BoxedStruct;

    public SomeStruct DefaultStruct;

    [Serializable]
    public struct SomeStruct
    {
        public int One;
        public int Two;
        public int Three;
    }
}

2.2 ButtonGroup

将 Button 分组显示。

  • string group = "_DefaultGroup"

    组名。

  • float order = 0.0f

    顺序。

  • int ButtonHeight

    按钮组中所有按钮的高度。

image-20240715003708316
// ButtonGroupExamplesComponent.cs

using System;
using Sirenix.OdinInspector;
using UnityEngine;

public class ButtonGroupExamplesComponent : MonoBehaviour
{
    public IconButtonGroupExamples iconButtonGroupExamples;

    [ButtonGroup]
    private void A() { }

    [ButtonGroup]
    private void B() { }

    [ButtonGroup]
    private void C() { }

    [ButtonGroup]
    private void D() { }

    [Button(ButtonSizes.Large)]
    [ButtonGroup("My Button Group")]
    private void E() { }

    [GUIColor(0, 1, 0)]
    [ButtonGroup("My Button Group")]
    private void F() { }

    [Serializable, HideLabel]
    public struct IconButtonGroupExamples
    {
        [ButtonGroup(ButtonHeight = 25), Button(SdfIconType.ArrowsMove, "")]
        void ArrowsMove() { }

        [ButtonGroup, Button(SdfIconType.Crop, "")]
        void Crop() { }

        [ButtonGroup, Button(SdfIconType.TextLeft, "")]
        void TextLeft() { }

        [ButtonGroup, Button(SdfIconType.TextRight, "")]
        void TextRight() { }

        [ButtonGroup, Button(SdfIconType.TextParagraph, "")]
        void TextParagraph() { }

        [ButtonGroup, Button(SdfIconType.Textarea, "")]
        void Textarea() { }
    }
}

​ 可以与 TitleGroup 组合使用。

image-20240715003758748
// BigTitleGroupExampleComponent.cs
using Sirenix.OdinInspector;
using UnityEngine;

public class BigTitleGroupExampleComponent : MonoBehaviour
{
    [BoxGroup("Titles", ShowLabel = false)]
    [TitleGroup("Titles/First Title")]
    public int A;
    
    [BoxGroup("Titles/Boxed")]
    [TitleGroup("Titles/Boxed/Second Title")]
    public int B;
    
    [TitleGroup("Titles/Boxed/Second Title")]
    public int C;
    
    [TitleGroup("Titles/Horizontal Buttons")]
    [ButtonGroup("Titles/Horizontal Buttons/Buttons")]
    public void FirstButton() { }
    
    [ButtonGroup("Titles/Horizontal Buttons/Buttons")]
    public void SecondButton() { }
}

2.3 FoldoutGroup

将对象添加到折叠组。

  • string groupName

    折叠组名称。

  • bool expanded

    是否默认展开。

  • float order = 0.0f

    折叠组的排序。

image-20240716034608539
// FoldoutGroupAttributeExamplesComponent.cs

using Sirenix.OdinInspector;
using UnityEngine;

public class FoldoutGroupAttributeExamplesComponent : MonoBehaviour
{
    [FoldoutGroup("Group 1")]
    public int A;

    [FoldoutGroup("Group 1")]
    public int B;

    [FoldoutGroup("Group 1")]
    public int C;

    [FoldoutGroup("Collapsed group", expanded: false)]
    public int D;

    [FoldoutGroup("Collapsed group")]
    public int E;

    [FoldoutGroup("$GroupTitle", expanded: true)]
    public int One;

    [FoldoutGroup("$GroupTitle")]
    public int Two;

    public string GroupTitle = "Dynamic group title";
}

2.4 ShowIfGroup / HideIfGroup

满足某个条件,则显示 / 隐藏指定组。

  • string path

    指定组的路径。

  • object value

    与路径末尾标签重名的属性等于该值时,则满足条件。

  • bool animate = true

    状态改变时是否启用滑入和滑出动画显示。

image-20240716000503730
// HideIfGroupExampleComponent.cs

using Sirenix.OdinInspector;
using UnityEngine;

public class HideIfGroupExampleComponent : MonoBehaviour
{
    public bool Toggle = true;

    [HideIfGroup("Toggle")]
    [BoxGroup("Toggle/Shown Box")]
    public int A, B;

    [BoxGroup("Box")]
    public InfoMessageType EnumField = InfoMessageType.Info;

    [BoxGroup("Box")]
    [HideIfGroup("Box/Toggle")]
    public Vector3 X, Y;

    // Like the regular If-attributes, HideIfGroup also supports specifying values.
    // You can also chain multiple HideIfGroup attributes together for more complex behaviour.
    [HideIfGroup("Box/Toggle/EnumField", Value = InfoMessageType.Info)]
    [BoxGroup("Box/Toggle/EnumField/Border", ShowLabel = false)]
    public string Name;

    [BoxGroup("Box/Toggle/EnumField/Border")]
    public Vector3 Vector;

    // HideIfGroup will by default use the name of the group,
    // but you can also use the MemberName property to override this.
    [HideIfGroup("RectGroup", Condition = "Toggle")]
    public Rect Rect;
}

2.5 HorizontalGroup

将对象添加到水平组。

  • float width = 0.0f

    水平宽度。

  • int marginLeft/marginRight = 0

    左/右侧边距(单位:像素)。

  • int PaddingLeft/PaddingRight = 0

    左右填充。

    值介于 0 和 1 之间的值将被视为百分比;值为 0 则表示忽略;大于 1 的整数被视为像素。

  • float order = 0.0f

    水平组的排序。

  • float Gap = 3f

    每列之间的宽度。

    值介于 0 和 1 之间的值将被视为百分比;否则为像素。

  • string Title

    水平组的标题名称。

image-20240716035140890
// HorizontalGroupAttributeExamplesComponent.cs

using System;
using Sirenix.OdinInspector;
using UnityEngine;

public class HorizontalGroupAttributeExamplesComponent : MonoBehaviour
{
    // The width can either be specified as percentage or pixels.
    // All values between 0 and 1 will be treated as a percentage.
    // If the width is 0 the column will be automatically sized.

    // Auto width
    [HorizontalGroup]
    public SomeFieldType Left1;

    [HorizontalGroup]
    public SomeFieldType Right1;

    // Margins
    [HorizontalGroup("row2", MarginRight = 0.4f)]
    public SomeFieldType Left2;

    [HorizontalGroup("row2")]
    public SomeFieldType Right2;


    // Custom width:
    [HorizontalGroup("row1", Width = 0.25f)] // 25 %
    public SomeFieldType Left3;

    [HorizontalGroup("row1", Width = 150)] // 150 px
    public SomeFieldType Center3;

    [HorizontalGroup("row1")] // Auto / expand
    public SomeFieldType Right3;


    // Gap Size
    [HorizontalGroup("row3", Gap = 3)]
    public SomeFieldType Left4;

    [HorizontalGroup("row3")]
    public SomeFieldType Center4;

    [HorizontalGroup("row3")] // Auto / expand
    public SomeFieldType Right4;


    // Title
    [HorizontalGroup("row4", Title = "Horizontal Group Title")]
    public SomeFieldType Left5;

    [HorizontalGroup("row4")]
    public SomeFieldType Center5;

    [HorizontalGroup("row4")]
    public SomeFieldType Right5;

    [HideLabel, Serializable]
    public struct SomeFieldType
    {
        [LabelText("@$property.Parent.NiceName")]
        [ListDrawerSettings(ShowIndexLabels = true)]
        public float[] x;
    }
}

2.6 ResponsiveButtonGroup

将按钮绘制在组内,该组将响应其可用的水平空间。

  • string group = "_DefaultResponsiveButtonGroup"

    组名。

image-20240715004200320
// ResponsiveButtonGroupExampleComponent.cs
using Sirenix.OdinInspector;
using UnityEngine;

#if UNITY_EDITOR // Editor namespaces can only be used in the editor.
using Sirenix.OdinInspector.Editor.Examples;
#endif

public class ResponsiveButtonGroupExampleComponent : MonoBehaviour
{
#if UNITY_EDITOR // Editor-related code must be excluded from builds
    [Button(ButtonSizes.Large), GUIColor(0, 1, 0)]
    private void OpenDockableWindowExample()
    {
        var window = UnityEditor.EditorWindow.GetWindow<MyDockableGameDashboard>();
        window.WindowPadding = new Vector4();
    }
#endif
    
    [OnInspectorGUI] private void Space1() { GUILayout.Space(20); }
    
    [ResponsiveButtonGroup] public void Foo() { }
    [ResponsiveButtonGroup] public void Bar() { }
    [ResponsiveButtonGroup] public void Baz() { }
    
    [OnInspectorGUI] private void Space2() { GUILayout.Space(20); }
    
    [ResponsiveButtonGroup("UniformGroup", UniformLayout = true)] public void Foo1() { }
    [ResponsiveButtonGroup("UniformGroup")] public void Foo2() { }
    [ResponsiveButtonGroup("UniformGroup")] public void LongesNameWins() { }
    [ResponsiveButtonGroup("UniformGroup")] public void Foo4() { }
    [ResponsiveButtonGroup("UniformGroup")] public void Foo5() { }
    [ResponsiveButtonGroup("UniformGroup")] public void Foo6() { }
    
    [OnInspectorGUI] private void Space3() { GUILayout.Space(20); }
    
    [ResponsiveButtonGroup("DefaultButtonSize", DefaultButtonSize = ButtonSizes.Small)] public void Bar1() { }
    [ResponsiveButtonGroup("DefaultButtonSize")] public void Bar2() { }
    [ResponsiveButtonGroup("DefaultButtonSize")] public void Bar3() { }
    [Button(ButtonSizes.Large), ResponsiveButtonGroup("DefaultButtonSize")] public void Bar4() { }
    [Button(ButtonSizes.Large), ResponsiveButtonGroup("DefaultButtonSize")] public void Bar5() { }
    [ResponsiveButtonGroup("DefaultButtonSize")] public void Bar6() { }
    
    [OnInspectorGUI] private void Space4() { GUILayout.Space(20); }
    
    [FoldoutGroup("SomeOtherGroup")]
    [ResponsiveButtonGroup("SomeOtherGroup/SomeBtnGroup")] public void Baz1() { }
    [ResponsiveButtonGroup("SomeOtherGroup/SomeBtnGroup")] public void Baz2() { }
    [ResponsiveButtonGroup("SomeOtherGroup/SomeBtnGroup")] public void Baz3() { }
}

​ 与 TabGroup 结合使用:

image-20240715004248291
// BigTabGroupExampleComponent.cs

using Sirenix.OdinInspector;
using UnityEngine;

public class BigTabGroupExampleComponent : MonoBehaviour
{
    [TitleGroup("Tabs")]
    [HorizontalGroup("Tabs/Split", Width = 0.5f)]
    [TabGroup("Tabs/Split/Parameters", "A")]
    public string NameA, NameB, NameC;

    [TabGroup("Tabs/Split/Parameters", "B")]
    public int ValueA, ValueB, ValueC;

    [TabGroup("Tabs/Split/Buttons", "Responsive")]
    [ResponsiveButtonGroup("Tabs/Split/Buttons/Responsive/ResponsiveButtons")]
    public void Hello() { }

    [ResponsiveButtonGroup("Tabs/Split/Buttons/Responsive/ResponsiveButtons")]
    public void World() { }

    [ResponsiveButtonGroup("Tabs/Split/Buttons/Responsive/ResponsiveButtons")]
    public void And() { }

    [ResponsiveButtonGroup("Tabs/Split/Buttons/Responsive/ResponsiveButtons")]
    public void Such() { }

    [Button]
    [TabGroup("Tabs/Split/Buttons", "More Tabs")]
    [TabGroup("Tabs/Split/Buttons/More Tabs/SubTabGroup", "A")]
    public void SubButtonA() { }

    [Button]
    [TabGroup("Tabs/Split/Buttons/More Tabs/SubTabGroup", "A")]
    public void SubButtonB() { }

    [Button(ButtonSizes.Gigantic)]
    [TabGroup("Tabs/Split/Buttons/More Tabs/SubTabGroup", "B")]
    public void SubButtonC() { }
}

2.7 TabGroup

将对象添加到选项卡组中。

  • string group

    组名。不指定组名,则添加到默认组中。

  • string tab

    选项卡。

  • SdfIconType icon

    图标。

  • bool useFixedHeight = false

    设置为 true,使整个选项卡组的高度保持恒定。

  • float order = 0.0f

    选项卡组的显示顺序(从小到大)。

  • string TextColor

    字体颜色。支持多种颜色格式。

    1. 命名颜色。如 “red”, “orange”, “green”, “blue”。
    2. 十六进制代码。如 “#FF0000”、“#FF0000FF”。
    3. RGBA。如 “RGBA(1,1,1,1)”。
    4. RGB。如 “RGB(1,1,1)”。
  • string TabName

    Inspector 窗口中显示的选项卡名称。

  • TabLayouting TabLayouting

    选项卡布局。

image-20240716040053425
// TabGroupExamplesComponent.cs

using Sirenix.OdinInspector;
using System;
using UnityEngine;

public class TabGroupExamplesComponent : MonoBehaviour
{
    [TabGroup("General")]
    public string playerName1;

    [TabGroup("General")]
    public int playerLevel1;

    [TabGroup("General")]
    public string playerClass1;

    [TabGroup("Stats")]
    public int strength1;

    [TabGroup("Stats")]
    public int dexterity1;

    [TabGroup("Stats")]
    public int intelligence1;

    [TabGroup("Quests")]
    public bool hasMainQuest1;

    [TabGroup("Quests")]
    public int mainQuestProgress1;

    [TabGroup("Quests")]
    public bool hasSideQuest1;

    [TabGroup("Quests")]
    public int sideQuestProgress1;


    [TabGroup("tab2", "General", SdfIconType.ImageAlt, TextColor = "green")]
    public string playerName2;

    [TabGroup("tab2", "General")]
    public int playerLevel2;

    [TabGroup("tab2", "General")]
    public string playerClass2;

    [TabGroup("tab2", "Stats", SdfIconType.BarChartLineFill, TextColor = "blue")]
    public int strength2;

    [TabGroup("tab2", "Stats")]
    public int dexterity2;

    [TabGroup("tab2", "Stats")]
    public int intelligence2;

    [TabGroup("tab2", "Quests", SdfIconType.Question, TextColor = "@questColor", TabName = "")]
    public bool hasMainQuest2;

    [TabGroup("tab2", "Quests")]
    public Color questColor = new Color(1, 0.5f, 0);

    [TabGroup("shrink tabs", "World Map", SdfIconType.Map, TextColor = "orange", TabLayouting = TabLayouting.Shrink)]
    [TabGroup("shrink tabs", "Character", SdfIconType.PersonFill, TextColor = "orange")]
    [TabGroup("shrink tabs", "Wand", SdfIconType.Magic, TextColor = "red")]
    [TabGroup("shrink tabs", "Abilities", TextColor = "green")]
    [TabGroup("shrink tabs", "Missions", SdfIconType.ExclamationSquareFill, TextColor = "yellow")]
    [TabGroup("shrink tabs", "Collection 1", TextColor = "blue")]
    [TabGroup("shrink tabs", "Collection 2", TextColor = "blue")]
    [TabGroup("shrink tabs", "Collection 3", TextColor = "blue")]
    [TabGroup("shrink tabs", "Collection 4", TextColor = "blue")]
    [TabGroup("shrink tabs", "Settings", SdfIconType.GearFill, TextColor = "grey")]
    [TabGroup("shrink tabs", "Guide", SdfIconType.QuestionSquareFill, TextColor = "blue")]
    public float a, b, c, d;

    [TabGroup("multi row", "World Map", SdfIconType.Map, TextColor = "orange", TabLayouting = TabLayouting.MultiRow)]
    [TabGroup("multi row", "Character", SdfIconType.PersonFill, TextColor = "orange")]
    [TabGroup("multi row", "Wand", SdfIconType.Magic, TextColor = "red")]
    [TabGroup("multi row", "Abilities", TextColor = "green")]
    [TabGroup("multi row", "Missions", SdfIconType.ExclamationSquareFill, TextColor = "yellow")]
    [TabGroup("multi row", "Collection 1", TextColor = "blue")]
    [TabGroup("multi row", "Collection 2", TextColor = "blue")]
    [TabGroup("multi row", "Collection 3", TextColor = "blue")]
    [TabGroup("multi row", "Collection 4", TextColor = "blue")]
    [TabGroup("multi row", "Settings", SdfIconType.GearFill, TextColor = "grey")]
    [TabGroup("multi row", "Guide", SdfIconType.QuestionSquareFill, TextColor = "blue")]
    public float e, f, g, h;

    [Serializable]
    [HideLabel]
    public class MyTabObject
    {
        public int A;
        public int B;
        public int C;
    }
}

2.8 ToggleGroup

将对象添加进单选框组。

  • string toggleMemberName

    启用或禁用 ToggleGroup 的任何 bool 字段或属性的名称。

  • float order = 0.0f

    单选框组的排序。

  • string groupTitle = null

    Inspector 窗口中显示的标题名称。

image-20240716043131827
// ToggleGroupExamplesComponent.cs

using Sirenix.OdinInspector;
using System;
using UnityEngine;

public class ToggleGroupExamplesComponent : MonoBehaviour
{
    // Simple Toggle Group
    [ToggleGroup("MyToggle")]
    public bool MyToggle;

    [ToggleGroup("MyToggle")]
    public float A;

    [ToggleGroup("MyToggle")]
    [HideLabel, Multiline]
    public string B;

    // Toggle for custom data.
    [ToggleGroup("EnableGroupOne", "$GroupOneTitle")]
    public bool EnableGroupOne = true;

    [ToggleGroup("EnableGroupOne")]
    public string GroupOneTitle = "One";

    [ToggleGroup("EnableGroupOne")]
    public float GroupOneA;

    [ToggleGroup("EnableGroupOne")]
    public float GroupOneB;

    // Toggle for individual objects.
    [Toggle("Enabled")]
    public MyToggleObject Three = new MyToggleObject();

    [Toggle("Enabled")]
    public MyToggleA Four = new MyToggleA();

    [Toggle("Enabled")]
    public MyToggleB Five = new MyToggleB();

    public MyToggleC[] ToggleList = new MyToggleC[] {
        new MyToggleC() { Test = 2f, Enabled = true, },
        new MyToggleC() { Test = 5f, },
        new MyToggleC() { Test = 7f, },
    };

    [Serializable]
    public class MyToggleObject
    {
        public bool Enabled;

        [HideInInspector]
        public string Title;

        public int A;
        public int B;
    }

    [Serializable]
    public class MyToggleA : MyToggleObject
    {
        public float C;
        public float D;
        public float F;
    }

    [Serializable]
    public class MyToggleB : MyToggleObject
    {
        public string Text;
    }

    [Serializable]
    public class MyToggleC
    {
        [ToggleGroup("Enabled", "$Label")]
        public bool Enabled;

        public string Label { get { return this.Test.ToString(); } }

        [ToggleGroup("Enabled")]
        public float Test;
    }
}

2.9 VerticalGroup

将对象添加到垂直组。

  • string groupId

    垂直组 ID。

  • float order = 0.0f

    垂直组的排序。

  • float PaddingTop/PaddingBottom

    上下填充(单位:像素)。

image-20240716044058307
// VerticalGroupExamplesComponent.cs

using Sirenix.OdinInspector;
using UnityEngine;

public class VerticalGroupExamplesComponent : MonoBehaviour
{
    [HorizontalGroup("Split")]
    [VerticalGroup("Split/Left")]
    public InfoMessageType First;

    [VerticalGroup("Split/Left")]
    public InfoMessageType Second;

    [HideLabel]
    [VerticalGroup("Split/Right")]
    public int A;

    [HideLabel]
    [VerticalGroup("Split/Right")]
    public int B;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1930803.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【Apache POI】Java解析Excel文件并处理合并单元格-粘贴即用

同为牛马&#xff0c;点个赞吧&#xff01; 一、Excel文件样例 二、工具类源码 import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.usermodel.XSSFWorkbookFactory; import org.springframework.web.multip…

【B树、B-树、B+、B*树】

目录 一、B-树&#xff08;即B树&#xff09;的定义及操作1.1、定义1.2、操作1.2.1、查找1.2.2、插入1.2.3、删除 二、B树的定义及操作2.1、定义2.2、操作2.2.1、查找2.2.2、插入2.2.3、删除 三、B*树 一、B-树&#xff08;即B树&#xff09;的定义及操作 1.1、定义 B-tree即…

解决vue3中el-input在form表单按下回车刷新页面

问题&#xff1a;在input框中点击回车之后不是调用我写的回车事件&#xff0c;而是刷新页面 原因&#xff1a; 如果表单中只有一个input 框则按下回车会直接关闭表单 所以导致刷新页面 解决方法 &#xff1a; 再写一个input 表单 &#xff0c;并设置style"display:none&…

【对顶堆 优先队列】2102. 序列顺序查询

本文涉及知识点 对顶堆 优先队列 LeetCode 2102. 序列顺序查询 一个观光景点由它的名字 name 和景点评分 score 组成&#xff0c;其中 name 是所有观光景点中 唯一 的字符串&#xff0c;score 是一个整数。景点按照最好到最坏排序。景点评分 越高 &#xff0c;这个景点越好。…

再谈有关JVM中的四种引用

1.强引用 强引用就是我们平时使用最多的那种引用&#xff0c;就比如以下的代码 //创建一个对象 Object obj new Object();//强引用 这个例子就是创建了一个对象并建立了强引用&#xff0c;强引用一般就是默认支持的当内存不足的时候&#xff0c;JVM开始垃圾回收&#xff0c…

【Java--数据结构】二叉树oj题(上)

前言 欢迎关注个人主页&#xff1a;逸狼 创造不易&#xff0c;可以点点赞吗~ 如有错误&#xff0c;欢迎指出~ 判断是否是相同的树 oj链接 要判断树是否一样&#xff0c;要满足3个条件 根的 结构 和 值 一样左子树的结构和值一样右子树的结构和值一样 所以就可以总结以下思路…

js补环境系列之剖析:原型、原型对象、实例对象三者互相转化(不讲废话、全是干货)

【作者主页】&#xff1a;小鱼神1024 【擅长领域】&#xff1a;JS逆向、小程序逆向、AST还原、验证码突防、Python开发、浏览器插件开发、React前端开发、NestJS后端开发等等 思考下&#xff1a;js补环境中&#xff0c;什么场景会用到原型、原型对象、实例对象&#xff1f; 举…

最大文件句柄数

优质博文&#xff1a;IT-BLOG-CN 灵感来源 一、什么是文件句柄 文件句柄File Handle是操作系统中用于访问文件的一种数据结构&#xff0c;通常是一个整数或指针。文件句柄用于标识打开的文件&#xff0c;每个打开的文件都有一个唯一的文件句柄。 它们是对文件、网络套接字或…

商业数据分析思维的培训PTT制作大纲分享

商业数据分析思维的培训PTT制作大纲: 基本步骤: 明确PPT的目的和主题 收集并整理相关内容资料 构思并确定PPT的框架大纲 编写PPT的内容文字 插入图片、图表等视觉元素 设计PPT的版式和模板 排练并修改PPT 输出并备份最终版本 目的:数据思维培养; 主题:商业数据分…

【TensorRT】Yolov5-DeepSORT 目标跟踪

Yolov5-DeepSORT-TensorRT 本项目是 Yolo-DeepSORT 的 C 实现&#xff0c;使用 TensorRT 进行推理 &#x1f680;&#x1f680;&#x1f680; 开源地址&#xff1a;Yolov5_DeepSORT_TensorRT&#xff0c;求 star⭐ ~ 引言 ⚡ 推理速度可达25-30FPS&#xff0c;可以落地部署&…

PriorityQueue 阅读记录

1、前言 1、优先队列&#xff0c;底层通过数组来构造树&#xff08;二叉树) 来实现的。 2、默认是最小堆&#xff08;取出来的是最小值)&#xff0c;可以通过传入一个比较器 comparator 来构造一个最大堆。 3、传入的参数不能为空&#xff0c;否则抛出NPE问题。 4、最大堆的…

git自动pull同步远程若干分支与本地若干分支

git自动pull同步远程若干分支与本地若干分支 假设远程代码仓库有100个分支&#xff0c;而本地只有10个本地分支与远程分支一一对应&#xff0c;现在要保持本地的这个10个分支与远程一致&#xff0c;最笨的方法是checkout到每个分支&#xff0c;然后一个一个的 git pull origin…

第11章 规划过程组(四)(11.4规划质量管理)

第11章 规划过程组&#xff08;四&#xff09;11.4规划质量管理&#xff0c;在第三版教材第412~414页&#xff1b; 文字图片音频方式 第一个知识点&#xff1a;工具与技术 1、数据分析&#xff08;重要知识点&#xff09; 成本效益分析 确定质量活动的可能成本与预期效益&a…

HTML2048小游戏

源代码在效果图后面 效果图 源代码 <!DOCTYPE html> <html lang"zh-CN"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>2048 Game&l…

Qt Creator的好用的功能

&#xff08;1&#xff09;ctrlf&#xff1a; 在当前文档进行查询操作 &#xff08;2&#xff09;f3: 找到后&#xff0c;按f3&#xff0c;查找下一个 &#xff08;3&#xff09;shiftf3: 查找上一个 右键菜单&#xff1a; (4)f4&#xff1a;在…

【海外云手机】静态住宅IP集成解决方案

航海大背景下&#xff0c;企业和个人用户对于网络隐私、稳定性以及跨国业务的需求日益增加。静态住宅IP与海外云手机的结合&#xff0c;提供了一种创新的集成解决方案&#xff0c;能够有效应对这些需求。 本篇文章分为三个部分&#xff1b;静态住宅优势、云手机优势、集成解决…

FPGA资源容量

Kintex™ 7 https://www.amd.com/zh-tw/products/adaptive-socs-and-fpgas/fpga/kintex-7.html#product-table AMD Zynq™ 7000 SoC https://www.amd.com/en/products/adaptive-socs-and-fpgas/soc/zynq-7000.html#product-table AMD Zynq™ UltraScale™ RFSoC 第一代 AMD Z…

对象存储解决方案:高性能分布式对象存储系统MinIO

文章目录 引言I 自动化数据管理界面1.1 图形用户界面:GUI1.2 命令行界面:MinIO CLI1.3 应用程序编程接口:MinIO APIII 部署集成2.1 静态端口分配2.2 将NGINX用作反向代理,配置负载。III 基础概念3.1 为什么是对象存储?3.2 MinIO支持哪些系统拓扑结构?3.3 时间同步3.4 存储…

react学习——28react-redux实现多组件共享数据(精简版)

1、目录结构 2、containers/Count/index.js import {createIncrementAction, createDecrementAction, createIncrementAsyncAction} from ../../redux/action/count //引入conect用于链接UI组件与redux import {connect} from react-redux import React, {Component} from &qu…

UML面向对象分析与设计

UML不是OOA/D&#xff0c;也不是方法&#xff0c;它仅仅只是一种图形表示法如果不掌握对象思想&#xff0c;那么UML或任何case工具(如ROSE)将毫无意义 我们需要一种用于〇OA/D的语言&#xff0c;这既是一种思考的工具&#xff0c;也是一种沟通的形式。因此&#xff0c;我们将在…