当前位置: 首页 > news >正文

tklink的登录做网站/百度统计代码安装位置

tklink的登录做网站,百度统计代码安装位置,文化传播 wordpress,微信网页上的网站怎么做的首先创建一个代码文件夹Scripts 从人物角色Player的基类开始 创建IPlayer类 首先我们考虑到如果不挂载MonoBehaviour需要将角色设置成预制体实例化到场景上十分麻烦, 所以我们采用继承MonoBehaviour类的角色基类方法写代码 也就是说这个脚本直接绑定在角色物体…

首先创建一个代码文件夹Scripts

从人物角色Player的基类开始   创建IPlayer类

首先我们考虑到如果不挂载MonoBehaviour需要将角色设置成预制体实例化到场景上十分麻烦,

所以我们采用继承MonoBehaviour类的角色基类方法写代码

也就是说这个脚本直接绑定在角色物体身上,就不需要实例化了,相对降低了复杂程度。

首先我们需要在unity场景制作一个Renderer类型的目标点

首先创建一个平面Plane改名为MovementTargetSign

修改位置

移除掉碰撞器

添加一个材质 

对材质进行修改 点击Shader选项

选择一个纹理

代码:

using UnityEngine;
//抽象角色类-包括玩家和NPC
public class IPlayer : MonoBehaviour{
    protected Animator _animator;//动画器组件引用
    private IWeapon _weapon = null;//武器的引用
}

public class IWeapon{

}

using UnityEngine;
public class Player : IPlayer{
    private Renderer movementSign;//移动标志
    private Collider attackPlane;//攻击区
    private Collider floorPlane;//普通地面(非攻击区)
    private Vector3 lookatPos;//面向位置
    private float rotSpeed = 20f;//移动旋转速度
    private float attackRotSpeed = 10f;//攻击旋转速度
}

public class FemaleWarrior : Player{

}
将FemaleWarrior代码挂载Player对象身上

对角色Player添加胶囊碰撞器

调整胶囊碰撞器位于角色中心

再添加刚体

关掉 使用重力Use Gravity 勾选

在约束上constraints 冻结旋转 x y z

如果制作的角色不需要重力则用碰撞器实现,

如果制作的角色需要重力    则用刚体   实现

先用刚体实现:

代码如下:

using UnityEngine;
//抽象角色类-包括玩家和NPC
public class IPlayer : MonoBehaviour{
    protected Animator _animator;//动画器组件引用
    private IWeapon _weapon = null;//武器的引用
}

public class IWeapon{

}

using UnityEngine;
public class Player : IPlayer{
    private Renderer movementSign;//移动标志
    private Collider attackPlane;//攻击区
    private Collider floorPlane;//普通地面(非攻击区)
    private Vector3 lookatPos;//面向位置
    private float rotSpeed = 20f;//移动旋转速度
    private float attackRotSpeed = 10f;//攻击旋转速度
    protected virtual void Awake() {
        //移动标志
        if (movementSign == null)
            movementSign = GameObject.Find("MovementTargetSign").GetComponent<Renderer>();
    }
    protected virtual void Start(){
        //移动标志默认放在玩家脚下
        movementSign.transform.position = transform.position + new Vector3(0,0.02f,0);
        movementSign.enabled = false;//关闭移动标志的显示
    }
    //跟随鼠标旋转
    public void RotateWithCursorPos() {
        RaycastHit hit;
        //构建一条从摄像机到鼠标位置的射线
        var Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(Ray, out hit)) {
            //计算方向
            Vector3 mousePos = new Vector3(hit.point.x, transform.position.y, hit.point.z);
            Vector3 playerDirection = mousePos - transform.position;
            if (playerDirection != Vector3.zero) {
                //旋转到目标方向
                transform.rotation = Quaternion.Slerp(transform.rotation,
                    Quaternion.LookRotation(playerDirection), Time.deltaTime * attackRotSpeed);
            }
        }
    }
    protected virtual void Update() {
        RotateWithCursorPos();
    }
}

public class FemaleWarrior : Player{
    protected override void Awake(){
        base.Awake();
    }
    protected override void Start(){
        base.Start();
    }
}
完成人物转向之后,开始做人物移动功能

首先添加代码,将动画机参数转换为哈希值

using UnityEngine;
public class AnimaterConsteantVelues {
    public static int WeaponID = Animator.StringToHash("WeaponID");
    public static int isCombat = Animator.StringToHash("isCombat");
    public static int isIdle = Animator.StringToHash("isIdle");
    public static int Attack = Animator.StringToHash("Attack");
}
在角色基类中添加函数

using UnityEngine;
//抽象角色类-包括玩家和NPC
public class IPlayer : MonoBehaviour{
    protected Animator _animator;//动画器组件引用
    private IWeapon _weapon = null;//武器的引用
    public IWeapon Weapon {
        get => _weapon;
        set => _weapon = value;
    }
    public void Attack() {
        if (_weapon != null)
            _weapon.Attack();
    }
}
修改抽象武器基类

using UnityEngine;
public abstract class IWeapon{
    public string WeaponName { get; set; }
    protected GameObject _weaponModel;
    protected GameObject _weaponPrefab;
    private int weaponID { get; set; }
    protected IPlayer _player { get; set; }
    public GameObject WeaponPrefab {
        get => _weaponModel; 
        set => _weaponModel = value;
    }
    public virtual void Attack() { }
    public virtual void RefreshLine() { }
    public IWeapon(int weaponID, string name, string weaponModelPath, IPlayer player){
        this.weaponID = weaponID;
        WeaponName = name;
        _player = player;
        if (weaponModelPath != "") {
            _weaponModel = Resources.Load<GameObject>(weaponModelPath);
            if (_weaponModel != null) {
                var weaponPos = ((Player)_player).handleWeaponPosList[weaponID];
                _weaponPrefab = GameObject.Instantiate(_weaponModel, weaponPos.position, weaponPos.rotation);
                _weaponPrefab.transform.SetParent(weaponPos);
                _weaponPrefab.SetActive(false);
            }
        }
    }
}
修改角色子类

using System.Collections.Generic;
using UnityEngine;
public class Player : IPlayer{
    private Renderer movementSign;//移动标志
    private Collider attackPlane;//攻击区
    private Collider floorPlane;//普通地面(非攻击区)
    private Vector3 lookatPos;//面向位置
    private float rotSpeed = 20f;//移动旋转速度
    private float attackRotSpeed = 10f;//攻击旋转速度
    private float fallSpeed;
    //列表
    [SerializeField]
    public List<Transform>handleWeaponPosList = new List<Transform>();
    protected virtual void Awake() {
        _animator = GetComponent<Animator>();
        floorPlane = GameObject.Find("Plane").GetComponent<Collider>();
        //移动标志
        if (movementSign == null)
            movementSign = GameObject.Find("MovementTargetSign").GetComponent<Renderer>();
    }
    protected virtual void Start(){
        //移动标志默认放在玩家脚下
        movementSign.transform.position = transform.position + new Vector3(0,2f,0);
        movementSign.enabled = false;//关闭移动标志的显示
    }
    //跟随鼠标旋转
    public void RotateWithCursorPos() {
        RaycastHit hit;
        //构建一条从摄像机到鼠标位置的射线
        var Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(Ray, out hit)) {
            //计算方向
            Vector3 mousePos = new Vector3(hit.point.x, transform.position.y, hit.point.z);
            Vector3 playerDirection = mousePos - transform.position;
            if (playerDirection != Vector3.zero) {
                //旋转到目标方向
                transform.rotation = Quaternion.Slerp(transform.rotation,
                    Quaternion.LookRotation(playerDirection), Time.deltaTime * attackRotSpeed);
            }
        }
    }
    public void Move(){
        RaycastHit hit;
        var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        if (Input.GetMouseButton(0)){
            if (floorPlane.Raycast(ray, out hit, 50f)){
                movementSign.transform.position = hit.point + new Vector3(0, 0.01f, 0);
                movementSign.enabled = true;
                lookatPos = hit.point;
            }
        }
        else if(Input.GetMouseButtonUp(1)){
            _animator.SetBool(AnimaterConsteantVelues.isCombat, true);
            _animator.SetTrigger(AnimaterConsteantVelues.Attack);
            Attack();
        }
        lookatPos.y = transform.position.y;
        var playerDirection = lookatPos - transform.position;
        if (playerDirection != Vector3.zero) 
            transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(playerDirection), Time.deltaTime * rotSpeed);
        var offset = movementSign.transform.position - transform.position;
        var sqrDistance = offset.sqrMagnitude;
        if (sqrDistance > 0.1f){
            _animator.SetBool(AnimaterConsteantVelues.isIdle, false);
            rotSpeed = 20f;
        }
        else {
            _animator.SetBool(AnimaterConsteantVelues.isIdle,true);
            movementSign.enabled = false;
            movementSign.transform.position = transform.position;
            rotSpeed = 0;
        }
        var bodyRay = new Ray(transform.position + transform.up, transform.up * -1);
        if (floorPlane.Raycast(bodyRay, out hit, 1.0f)) {
            if (hit.point.y > transform.position.y + 0.02f)
                transform.position = hit.point + new Vector3(0, 0.02f, 0);
            else if (floorPlane.Raycast(bodyRay, out hit, 1.2f))
                if (hit.point.y > transform.position.y - 0.02f) 
                    transform.position = hit.point + new Vector3(0, -0.02f, 0);
            else {
                fallSpeed += 0.1f;
                var v = new Vector3(0, fallSpeed * Time.deltaTime, 0);
                transform.position -= v;
                movementSign.transform.position = transform.position + new Vector3(0, 0.01f, 0);
            }
        }
    }
    protected virtual void Update() {
        RotateWithCursorPos();
        Move();
    }
}

回到Unity场景中拖拽填充武器刷新

人物移动完成

接下来完成背包系统 

放进预制体包后完全解压缩

调整好Slot0-4的背景位置,将四个子物体预制体包后删除

子物体位置都改成0

隐藏/取消激活

接下来完成拾取道具

加碰撞器

调节碰撞器

加触发器

加刚体

修改名字

创建脚本

using JetBrains.Annotations;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//可拾取道具
public class CanPickupItem : MonoBehaviour{
    public AudioClip pickUpSound;//拾取声音
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player")) {
            //播放声音
            if (pickUpSound != null)
                AudioSource.PlayClipAtPoint(pickUpSound,transform.position);
            //将本道具更新到背包列表中
            GameObject.FindGameObjectWithTag("InventoryUITag").GetComponent<InventoryManager>().ItemNames.Add(gameObject.name);
            Destroy(gameObject);

        }
    }
}
 

挂载脚本

同样挂载到手枪上

添加标签

创建脚本

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class InventoryManager : MonoBehaviour
{
    //道具名称列表
    public List<string> ItemNames = new List<string>();

}
 

给人物标签

标签

运行即可触发拾取道具

接下来做背包系统

首先这里不用字典代码,运用简单方式制作,前提必须保证道具 和 道具图片的英文名字存在包含关系

在管理类中写一个打开背包的方法

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class InventoryManager : MonoBehaviour
{
    //道具名称列表
    public List<string> ItemNames = new List<string>();
    //打开或关闭背包
    public void OpenOrCloseInventoryUI(bool isOpen) {
        transform.Find("Panel").gameObject.SetActive(isOpen);
    }
}

using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting.Antlr3.Runtime;
using UnityEngine;
using UnityEngine.UI;

public class InventoryManager : MonoBehaviour
{
    //道具名称列表
    public List<string> ItemNames = new List<string>();
    //是否显示背包UI
    private bool isShowInventoryUI = false;
    //打开或关闭背包
    public void OpenOrCloseInventoryUI(bool isOpen) {
        transform.Find("Panel").gameObject.SetActive(isOpen);
    }
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.B)) {
            isShowInventoryUI = !isShowInventoryUI;
            //打开或关闭UI
            OpenOrCloseInventoryUI(isShowInventoryUI);
        }
    }
}

即可实现背包按B键开关背包UI

接下来我们需要做一个背包图标的UI,点击UI也能打开背包

即完成鼠标点击显隐背包UI 及 键盘B键显隐背包UI

接下来做UI文本更新,意义不大可省略,存在的意义在于完善体系

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class InventoryManager : MonoBehaviour{
    //道具名称列表
    public List<string> ItemNames = new List<string>();
    //是否显示背包UI
    private bool isShowInventoryUI = false;
    //UI界面中的文本
    public Text[] textUI;
    //激活或关闭背包UI显示
    public void OpenOrCloseInventoryUI(bool isOpen) {
        transform.Find("Panel").gameObject.SetActive(isOpen);
        //更新文本
        UpdateInventoryTextUI();
    }
    private void Update(){
        if (Input.GetKeyDown(KeyCode.B))
            InventoryUIState();
    }
    //打开或关闭背包
    public void InventoryUIState() {
        isShowInventoryUI = !isShowInventoryUI;
        //打开或关闭UI
        OpenOrCloseInventoryUI(isShowInventoryUI);
    }
    //更新文本UI 
    private void UpdateInventoryTextUI(){
        for(int i = 0;i< ItemNames.Count;i++)
            textUI[i].text = ItemNames[i];
    }
}

调整文本在背包UI中的位置

取消激活面板

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class InventoryManager : MonoBehaviour{
    public List<string> ItemNames = new List<string>();//道具名称列表
    private bool isShowInventoryUI = false;//是否显示背包UI
    public Text[] textUI;//UI界面中的文本
    public Image[] availableItemIcons;//可以获取的道具图标
    public void OpenOrCloseInventoryUI(bool isOpen){//激活或关闭背包UI显示
        transform.Find("Panel").gameObject.SetActive(isOpen);
        UpdateInventoryTextUI(); //更新文本
        UpdateInventoryIconUI();//更新图标
    }
    private void Update(){
        if (Input.GetKeyDown(KeyCode.B))
            InventoryUIState();
    }
    public void InventoryUIState(){//打开或关闭背包
        isShowInventoryUI = !isShowInventoryUI;
        OpenOrCloseInventoryUI(isShowInventoryUI);//打开或关闭UI
    }
    private void UpdateInventoryTextUI(){//更新文本UI 
        for (int i = 0;i < ItemNames.Count;i++)
            textUI[i].text = ItemNames[i];
    }
    private void UpdateInventoryIconUI(){//更新图标UI
        for (int i = 0; i < ItemNames.Count; i++){
            Image itemIcon = GetIconPrefabByItemName(ItemNames[i]);//根据道具名称返回对应的图标
            if (itemIcon != null){
                Image newItemIcon = Instantiate(itemIcon);//将图标克隆到对应的Image中
                newItemIcon.transform.SetParent(textUI[i].transform.parent);//更改父物体
                RectTransform rt = newItemIcon.GetComponent<RectTransform>();//调整位置
                rt.anchoredPosition = Vector3.zero;
            }
            else
                Debug.LogError("没找到对应图标");
        }
    }
    private Image GetIconPrefabByItemName(string name){//根据道具名称返回对应的图标
        for (int i = 0; i < availableItemIcons.Length; i++){
            if (availableItemIcons[i].name.Contains(name))
                return availableItemIcons[i];
        }
        return null;
    }
}

隐藏文字部分

运行即完成

挂移动摄像机

using UnityEngine;
public class CameraMove : MonoBehaviour{ //第三人称摄像机简单版
    public Transform target;//摄像机的跟随目标
    public float distance = 8.0f;//摄像机与目标之间的距离
    private float x, y, z;
    private float xSpeed = 250.0f;
    private float ySpeed = 120.0f;
    public float yMinlimit = -45.0f;//限制上下移动角度
    public float yMaxlimit = 45.0f;
    private void Awake(){
        //注册场景加载完毕事件
        //EventCenter.AddListener(EventType.SceneLoadComplete, SetTarget);
    }
    private void SetTarget(){
        //将标签为Player的物体设置为跟踪目标
        Transform player = GameObject.FindGameObjectWithTag("Player").transform;
        if (player != null && target == null)
            target = player;
    }
    private void Start(){
        Vector3 angles = transform.eulerAngles;//获取摄像机的当前角度
        x = angles.x;
        y = angles.y;
        z = -distance;
        GoRight();
    }

    private void LateUpdate(){
        float temp = Input.GetAxis("Mouse ScrollWheel");//获取滚轮数值
        if (target != null){
            if (Input.GetMouseButton(0)){
                x += Input.GetAxis("Mouse X") * xSpeed * 0.02f;
                y -= Input.GetAxis("Mouse Y") * ySpeed * 0.02f;
            }
        }
        //钳制上下移动的角度
        y = ClampAngle(y,yMinlimit,yMaxlimit);
        z += temp * 100f * 0.02f;//数值按照自己喜好设定
        z = Mathf.Clamp(z,-20f,-3.0f);//距离限制,最远是距离玩家20米,最近是3米
        GoRight();//作用于摄像机
    }
    float ClampAngle(float angle,float min,float max){
        if (angle < -360)
            angle += 360;
        if (angle > 360)
            angle -= 360;
        return Mathf.Clamp(angle,min,max);
    }
    //摄像机控制位置及角度的核心方法
    void GoRight(){
        if (target == null)
            return;
        Quaternion rotation = Quaternion.Euler(y,x,0);//摄像机角度
        Vector3 position = rotation * new Vector3(0.0f,0.0f,z)+target.position;
        transform.position = position;//摄像机位置
        transform.rotation = rotation;//摄像机角度
    }
}

即完成摄像机跟随人物移动

相关文章:

unity【动画】脚本_角色动画控制器 c#

首先创建一个代码文件夹Scripts 从人物角色Player的基类开始 创建IPlayer类 首先我们考虑到如果不挂载MonoBehaviour需要将角色设置成预制体实例化到场景上十分麻烦&#xff0c; 所以我们采用继承MonoBehaviour类的角色基类方法写代码 也就是说这个脚本直接绑定在角色物体…...

Java代码如何对Excel文件进行zip压缩

1&#xff1a;新建 ZipUtils 工具类 package com.ly.cloud.datacollection.util;import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URLEncoder; import ja…...

改进YOLO系列:12.Repulsion损失函数【遮挡】

1. RepLoss论文 物体遮挡问题可以分为类内遮挡和类间遮挡两种情况。类间遮挡产生于扎堆的同类物体,也被称为密集遮挡(crowd occlusion)。Repulsion损失函数由三个部分构成,yolov5样本匹配,得到的目标框和预测框-一对应第一部分主要作用:预测目标框吸引IOU最大的真实目标框,…...

win11网络连接正常,但是无法正常上网

前言&#xff1a; 这个是一个win11的bug&#xff0c;好多人都遇到了&#xff0c;在孜孜不倦的百度下&#xff0c;毫无收获&#xff0c;终于是在抖音上看到有人分享的经验而解决了这个问题。 找到internet选项&#xff0c;然后点击打开 选择连接 将代理服务器中&#xff0c;为…...

硬科技企业社区“曲率引擎”品牌正式发布

“曲率引擎”&#xff0c;是科幻作品中最硬核的加速系统&#xff0c;通过改变时空的曲率&#xff0c;可实现光速飞行甚至能够超越光速。11月3日&#xff0c;“曲率引擎&#xff08;warp drive&#xff09;”作为硬科技企业社区品牌&#xff0c;在2023全球硬科技创新大会上正式对…...

少儿编程 2023年9月中国电子学会图形化编程等级考试Scratch编程三级真题解析(判断题)

2023年9月scratch编程等级考试三级真题 判断题(共10题,每题2分,共20分) 19、运行程序后,“我的变量”的值为25 答案:对 考点分析:考查积木综合使用,重点考查变量和运算积木的使用 开始我的变量为50,执行完第二行代码我的变量变为49,条件不成立执行否则语句,所以…...

MCU常见通信总线串讲(二)—— RS232和RS485

&#x1f64c;秋名山码民的主页 &#x1f602;oi退役选手&#xff0c;Java、大数据、单片机、IoT均有所涉猎&#xff0c;热爱技术&#xff0c;技术无罪 &#x1f389;欢迎关注&#x1f50e;点赞&#x1f44d;收藏⭐️留言&#x1f4dd; 获取源码&#xff0c;添加WX 目录 前言一…...

LazyVim: 将 Neovim 升级为完整 IDE | 开源日报 No.67

curl/curl Stars: 31.5k License: NOASSERTION Curl 是一个命令行工具&#xff0c;用于通过 URL 语法传输数据。 核心优势和关键特点包括&#xff1a; 可在命令行中方便地进行数据传输支持多种协议 (HTTP、FTP 等)提供丰富的选项和参数来满足不同需求 kubernetes/ingress-n…...

想要搭建网站帮助中心,看这一篇指南就对了!

在现今互联网时代&#xff0c;除了让用户了解产品的功能和一些操作&#xff0c;很多企业都需要在网上进行信息的发布和产品销售等业务活动。而这就需要一个帮助中心&#xff0c;在用户遇到问题或者需要了解更多信息的时候&#xff0c;能够快速地解答他们的疑惑和提供响应的帮助…...

92.更新一些收藏的经验贴总结学习

一、JS相关 1.进制转换 &#xff08;1&#xff09;十进制转二进制 十进制数除2取余法&#xff1a;十进制数除2&#xff0c;余数为权位上的数&#xff0c;得到的商继续除2&#xff0c;直到商为0。最后余数从下往上取值。 &#xff08;2&#xff09;二进制转十进制 把二进制…...

mysql 问题解决 4

7、集群 7.1 日志 1、MySQL 中有哪些常见日志? MySQL 中有以下常见的日志类型: 错误日志(Error Log):记录 MySQL 服务器在运行过程中出现的错误信息。通用查询日志(General Query Log):记录所有连接到 MySQL 服务器的 SQL 查询语句。慢查询日志(Slow Query Log):…...

llama-7B、vicuna-7b-delta-v1.1和vicuna-7b-v1.3——使用体验

Chatgpt的出现给NLP领域带来了让人振奋的消息&#xff0c;可以很逼真的模拟人的对话&#xff0c;回答人们提出的问题&#xff0c;不过Chatgpt参数量&#xff0c;规模&#xff0c;训练代价都很昂贵。 幸运的是&#xff0c;出现了开源的一些相对小的模型&#xff0c;可以在本地或…...

深入理解JVM虚拟机第十九篇:JVM字节码中方法内部的结构和与局部变量表中变量槽的介绍

大神链接:作者有幸结识技术大神孙哥为好友,获益匪浅。现在把孙哥视频分享给大家。 孙哥链接:孙哥个人主页 作者简介:一个颜值99分,只比孙哥差一点的程序员 本专栏简介:话不多说,让我们一起干翻JVM 本文章简介:话不多说,让我们讲清楚虚拟机栈存储结构和运行原理 文章目…...

windows好玩的cmd命令

颜色 后边的数字查表吧,反正我是喜欢一个随机的数字 color 01MAC getmac /v更新主机IP地址 通过DHCP更新 ipconfig /release ipconfig /renew改标题 title code with 你想要的标题...

线扫相机DALSA--常见问题四:修改相机参数,参数保存无效情况

该问题是操作不当&#xff0c;未按照正常步骤保存参数所致&#xff0c;相机为RAM机制&#xff0c;参数需保存在采集卡的ROM内。 保存参数步骤&#xff1a; ①首先将相机参数保存至User Set1&#xff1b; ②然后回到Board(采集卡)参数设置区&#xff0c;鼠标选中Basic Timing&a…...

linux中用date命令获取昨天、明天或多天前后的日期

在实际操作中&#xff0c;一些脚本中会调用明天&#xff0c;或者昨天&#xff0c;或更多天前的日期&#xff0c;本文将叙述讲述用date命令实现时间的显示。在Linux系统中用man date -d 查询的参数说的比较模糊&#xff0c;以下举例进一步说明&#xff1a; # man date -d, --da…...

【无标题】360压缩软件怎么用?超级好用!

360压缩是一款功能强大的解压缩软件&#xff0c;如何用它压缩文件呢&#xff1f;下面给出了详细的操作步骤。 一、360压缩详细步骤 1、下载软件后&#xff0c;在电脑上右击需要压缩的文件&#xff0c;在弹出的菜单中点击【添加到压缩文件】选项。 2、在360压缩窗口中按需设置相…...

一图搞懂傅里叶变换(FT)、DTFT、DFS和DFT之间的关系

自然界中的信号都是模拟信号&#xff0c;计算机无法处理&#xff0c;因此我们会基于奈奎斯特定理对模拟信号采样得到数字信号。 但是我们发现&#xff0c;即便是经过采样&#xff0c;在时域上得到了数字信号&#xff0c;而在频域上还是连续信号。 因此我们可以在时域中选取N点…...

行情分析——加密货币市场大盘走势(11.7)

大饼昨日下跌过后开始有回调的迹象&#xff0c;现在还是在做指标修复&#xff0c;大饼的策略保持逢低做多。稳健的依然是不碰&#xff0c;目前涨不上去&#xff0c;跌不下来。 以太昨天给的策略&#xff0c;依然有效&#xff0c;现在以太坊开始回调。 目前来看&#xff0c;回踩…...

阿里微服务质量保障系列:故障演练

对于很多大型企业(如阿里巴巴)来说,经过多年的技术演进,系统工具和架构已经高度垂直化,服务器规模也达到了比较大的体量。当服务规模大于一定量(如10000台)时,小概率的硬件故障每天都会发生。这时如果需要人的干预,系统就无法可靠的伸缩。 为此每一层的系统都会面向失…...

基于springboot+vue开发的教师工作量管理系

教师工作量管理系 springboot31 源码合集&#xff1a;www.yuque.com/mick-hanyi/javaweb 源码下载&#xff1a;博主私 摘要 随着信息技术在管理上越来越深入而广泛的应用&#xff0c;管理信息系统的实施在技术上已逐步成熟。本文介绍了教师工作量管理系统的开发全过程。通过…...

【NI-DAQmx入门】NI-DAQmx之C、C++、VB、VB.net与C#支持

DAQmx应用程序编程接口(API) DAQmx附带数据采集编程所需的API。DAQmx API只是一组库&#xff0c;其中包含关于如何执行所有数据采集操作的函数。这些API支持LabWindows/CVI、C、C、Visual Basic 6.0、VB.NET和C#。 DAQmx API随DAQmx驱动程序一起安装&#xff0c;包含以下参考…...

python转xml为json

以下代码取自获取PA防火墙策略XML文件并转为JSON文件的场景&#xff1a; 通过PA防火墙API获取防火墙策略 防火墙策略xpath为./result/security/rules/entry 以下代码实现将所有entry即策略与策略相关属性转为json对象并存储至文件 import xml.etree.ElementTree as ET import …...

PHP Curl请求封装

php 中curl请求模块封装 <?php namespace App\Utils;/*** http 工具类* author Administrator**/ class HttpUtils {private static $_instance;private function __construct(){}public static function getInstance(){if( null self::$_instance ){self::$_instance n…...

java list set 特性

List的常用实现类 ArrayList (常用) JDK1.2 底层数组实现 查询快,增删慢 线程不安全,效率高 LinkedList JDK1.2 底层链表实现 查询慢,增删快 线程不安全,效率高 Vector JDK1.0 底层数组实现 都慢 线程安全,效率低 List 集合名new 实现类(); 常用方法 集合名.方法名(实参列表…...

Docker 用centos 编译安装apache

Docker 用centos 编译安装apache 前提条件&#xff1a; 安装docker 如果想安装docker请查阅&#xff1a;安装docker 环境准备&#xff1a;centos8 拉取centos镜像 [rootlvs docker]# docker pull centos:8 8: Pulling from library/centos a1d0c7532777: Pull complete Di…...

专访虚拟人科技:如何利用 3DCAT 实时云渲染打造元宇宙空间

自古以来&#xff0c;人们对理想世界的探索从未停止&#xff0c;而最近元宇宙的热潮加速了这一步伐&#xff0c;带来了许多新的应用。作为元宇宙的关键入口&#xff0c;虚拟现实&#xff08;VR&#xff09;将成为连接虚拟和现实的桥梁。苹果发布的VISION PRO头戴设备将人们对VR…...

第三章:人工智能深度学习教程-基础神经网络(第二节-ANN 和 BNN 的区别)

在本文中&#xff0c;我们将了解单层感知器及其使用 TensorFlow 库在Python中的实现。神经网络的工作方式与我们的生物神经元的工作方式相同。 生物神经元的结构 生物神经元具有三个基本功能 接收外部信号。 处理信号并增强是否需要发送信息。 将信号传递给目标细胞&#x…...

回归模型原理总结及代码实现

前言 本文将介绍回归模型算法&#xff0c;并总结了一些常用的除线性回归模型之外的模型&#xff0c;其中包括一些单模型及集成学习器。 保序回归、多项式回归、多输出回归、多输出K近邻回归、决策树回归、多输出决策树回归、AdaBoost回归、梯度提升决策树回归、人工神经网络、…...

游戏开发中的“御用中介“

点击上方亿元程序员关注和★星标 引言 大家好&#xff0c;我是亿元程序员&#xff0c;一位有着8年游戏行业经验的主程。 本系列是《和8年游戏主程一起学习设计模式》&#xff0c;让糟糕的代码在潜移默化中升华&#xff0c;欢迎大家关注分享收藏订阅。 游戏开发中的"御用…...