CAD二次开发(4)-编辑图形

工具类:EditEntityTool.cs

using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AcDotNetTool;
namespace _03编辑图形
{public static  partial class EditEntityTool{/// <summary>/// 改变图形颜色/// </summary>/// <param name="c1Id">图形的ObjectId</param>/// <param name="colorIndex">颜色索引</param>public  static void ChangeEntityColor(this ObjectId c1Id, short colorIndex){//图形数据库Database db = HostApplicationServices.WorkingDatabase;using (Transaction trans = db.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead);//获取图形对象Entity ent1 = (Entity)c1Id.GetObject(OpenMode.ForWrite);ent1.ColorIndex = colorIndex;trans.Commit();}}/// <summary>/// 改变图形颜色/// </summary>/// <param name="ent">图形对象</param>/// <param name="colorIndex">颜色索引</param>public static void ChangeEntityColor(this Entity ent, short colorIndex){//判断图形的IsNewlyObjectif (ent.IsNewObject){ent.ColorIndex = colorIndex;}else{ent.ObjectId.ChangeEntityColor(colorIndex);}}/// <summary>/// 移动图形/// </summary>/// <param name="entId">图形对象的ObjectId</param>/// <param name="sorucePoint">参考原点</param>/// <param name="targetPoint">参考目标点</param>public static void MoveEntity(this ObjectId entId, Point3d sourcePoint, Point3d targetPoint){//当前图形数据库Database db = HostApplicationServices.WorkingDatabase;using (Transaction trans = db.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead);//打开图形//Entity ent = (Entity)trans.GetObject(entId, OpenMode.ForWrite);Entity ent = (Entity)entId.GetObject(OpenMode.ForWrite);//计算变换矩阵Vector3d vector = sourcePoint.GetVectorTo(targetPoint);Matrix3d mt = Matrix3d.Displacement(vector);ent.TransformBy(mt);//提交事务处理trans.Commit();}}/// <summary>/// 移动图形/// </summary>/// <param name="entId">图形对象</param>/// <param name="sorucePoint">参考原点</param>/// <param name="targetPoint">参考目标点</param>public static void MoveEntity(this Entity ent, Point3d sourcePoint, Point3d targetPoint){//判断图形对象的IsNewlyObejct属性if (ent.IsNewObject){//计算变换矩阵Vector3d vector = sourcePoint.GetVectorTo(targetPoint);Matrix3d mt = Matrix3d.Displacement(vector);ent.TransformBy(mt);}else{ent.ObjectId.MoveEntity(sourcePoint, targetPoint);}}/// <summary>/// 复制图形/// </summary>/// <param name="entId">图形的半ObjectId</param>/// <param name="sourcePoint">参考起点</param>/// <param name="targetPoint">参考终点</param>/// <returns>图形对象,没有加入图形数据库</returns>public static Entity CopyEntity(this ObjectId entId, Point3d sourcePoint, Point3d targetPoint){//声明一个图形对象Entity entR;//当前图形数据库Database db = HostApplicationServices.WorkingDatabase;using (Transaction trans = db.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead);//打开图形//Entity ent = (Entity)trans.GetObject(entId, OpenMode.ForWrite);Entity ent = (Entity)entId.GetObject(OpenMode.ForWrite);//计算变换矩阵Vector3d vector = sourcePoint.GetVectorTo(targetPoint);Matrix3d mt = Matrix3d.Displacement(vector);entR =  ent.GetTransformedCopy(mt);//提交事务处理trans.Commit();}return entR;}/// <summary>/// 复制图形/// </summary>/// <param name="entId">图形对象ram>/// <param name="sourcePoint">参考起点</param>/// <param name="targetPoint">参考终点</param>/// <returns>图形对象,没有加入图形数据库</returns>public static Entity CopyEntity(this Entity ent, Point3d sourcePoint, Point3d targetPoint){//声明一个图形对象Entity entR;//判断图形对象的IsNewlyObejct属性if (ent.IsNewObject){//计算变换矩阵Vector3d vector = sourcePoint.GetVectorTo(targetPoint);Matrix3d mt = Matrix3d.Displacement(vector);entR =  ent.GetTransformedCopy(mt);}else{entR =  ent.ObjectId.CopyEntity(sourcePoint, targetPoint);}return entR;}/// <summary>/// 旋转图形/// </summary>/// <param name="ent">图形对象的ObjectId</param>/// <param name="center">旋转中点</param>/// <param name="degree">旋转的角度</param>public static void  RotateEntity(this ObjectId entId, Point3d center,double degree){//当前图形数据库Database db = HostApplicationServices.WorkingDatabase;using (Transaction trans = db.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead);//打开图形//Entity ent = (Entity)trans.GetObject(entId, OpenMode.ForWrite);Entity ent = (Entity)entId.GetObject(OpenMode.ForWrite);//计算变换矩阵Matrix3d mt = Matrix3d.Rotation(degree.DegreeToAngle(), Vector3d.ZAxis, center);ent.TransformBy(mt);//提交事务处理trans.Commit();}}/// <summary>/// 旋转图形/// </summary>/// <param name="ent">图形对象</param>/// <param name="center">旋转中点</param>/// <param name="degree">旋转的角度</param>public static void RotateEntity(this Entity ent, Point3d center, double degree){//判断图形对象的IsNewlyObejct属性if (ent.IsNewObject){//计算变换矩阵Matrix3d mt = Matrix3d.Rotation(degree.DegreeToAngle(), Vector3d.ZAxis, center);ent.TransformBy(mt);}else{ent.ObjectId.RotateEntity(center, degree);}}/// <summary>/// 镜像图形/// </summary>/// <param name="entId">图形对象的ObjectId</param>/// <param name="point1">第一个镜像点</param>/// <param name="point2">第二个镜像点</param>/// <param name="isEraseSoruce">是否删除原图</param>/// <returns>返回新的图形对象,没有加入图形数据库</returns>public static Entity MirrorEntity(this ObjectId entId, Point3d point1, Point3d point2, bool isEraseSoruce){//声明一个图形对象,用于返回Entity entR;//计算镜像的变换矩阵Matrix3d mt = Matrix3d.Mirroring(new Line3d(point1, point2));//打开事务处理using (Transaction trans = entId.Database.TransactionManager.StartTransaction()){//打开原对象Entity ent = (Entity)trans.GetObject(entId, OpenMode.ForWrite);//这里得到的图形的IsNewlyObject = trueentR = ent.GetTransformedCopy(mt);//判断是否删除对象if (isEraseSoruce){ent.Erase();}trans.Commit();}return entR;}/// <summary>/// 镜像图形/// </summary>/// <param name="entId">图形对象</param>/// <param name="point1">第一个镜像点</param>/// <param name="point2">第二个镜像点</param>/// <param name="isEraseSoruce">是否删除原图</param>/// <returns>返回新的图形对象,没有加入图形数据库</returns>public static Entity MirrorEntity(this Entity ent, Point3d point1, Point3d point2, bool isEraseSoruce){//声明一个图形对象,用于返回Entity entR;if (ent.IsNewObject == true){//计算镜像的变换矩阵Matrix3d mt = Matrix3d.Mirroring(new Line3d(point1, point2));entR = ent.GetTransformedCopy(mt);}else{entR  = ent.ObjectId.MirrorEntity(point1, point2, isEraseSoruce);}return entR;}/// <summary>/// 缩放图形/// </summary>/// <param name="entId">图形对象的ObjectId</param>/// <param name="basePoint">缩放的基点</param>/// <param name="facter">缩放比例</param>public static void ScaleEntity(this ObjectId entId, Point3d basePoint, double facter){//计算缩放矩阵Matrix3d mt = Matrix3d.Scaling(facter, basePoint);//启动事务处理using (Transaction trans = entId.Database.TransactionManager.StartTransaction()){//打开要缩放的图形对象Entity ent = (Entity)entId.GetObject(OpenMode.ForWrite);ent.TransformBy(mt);trans.Commit();}}/// <summary>/// 缩放图形/// </summary>/// <param name="entId">图形对象的</param>/// <param name="basePoint">缩放的基点</param>/// <param name="facter">缩放比例</param>public static void ScaleEntity(this Entity ent, Point3d basePoint, double facter){//判断图形对象的IsNewlyObject属性if (ent.IsNewObject == true){//计算缩放矩阵Matrix3d mt = Matrix3d.Scaling(facter, basePoint);ent.TransformBy(mt);}else{ent.ObjectId.ScaleEntity(basePoint, facter);}}/// <summary>/// 删除图形对象/// </summary>/// <param name="entId">图形对象的ObjectId</param>public static void EraseEntity(this ObjectId entId){//打开事务处理using (Transaction trans = entId.Database.TransactionManager.StartTransaction()){//打开要缩放的图形对象Entity ent = (Entity)entId.GetObject(OpenMode.ForWrite);ent.Erase();trans.Commit();}}/// <summary>/// 巨型阵列/// </summary>/// <param name="entId">图形对象的ObjectId</param>/// <param name="rowNum">行数</param>/// <param name="columnNum">列数</param>/// <param name="disRow">行距</param>/// <param name="disColumn">列距</param>/// <returns>List<Entity> 已加入图形数据库</returns>public static List<Entity> ArrayRectEntity(this ObjectId entId,int rowNum,int columnNum,double disRow,double disColumn){//声明一个Enity类型的集合List<Entity> entList = new List<Entity>();//当前图形数据库Database db = HostApplicationServices.WorkingDatabase;using (Transaction trans = db.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);//打开图形//Entity ent = (Entity)trans.GetObject(entId, OpenMode.ForWrite);Entity ent = (Entity)entId.GetObject(OpenMode.ForWrite);//计算变换矩阵for (int i = 0; i < rowNum; i++){for (int j = 0; j < columnNum; j++){Matrix3d mt = Matrix3d.Displacement(new Vector3d(j * disColumn, i * disRow, 0));Entity entA = ent.GetTransformedCopy(mt);btr.AppendEntity(entA);trans.AddNewlyCreatedDBObject(entA,true);entList.Add(entA);}}ent.Erase();//提交事务处理trans.Commit();}return entList;}/// <summary>/// 巨型阵列/// </summary>/// <param name="entId">图形对象</param>/// <param name="rowNum">行数</param>/// <param name="columnNum">列数</param>/// <param name="disRow">行距</param>/// <param name="disColumn">列距</param>/// <returns>List<Entity> 已加入图形数据库</returns>public static List<Entity> ArrayRectEntity(this Entity entS, int rowNum, int columnNum, double disRow, double disColumn){if (entS.IsNewObject == true){//声明一个Enity类型的集合List<Entity> entList = new List<Entity>();Database db = HostApplicationServices.WorkingDatabase;using (Transaction trans = db.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);for (int i = 0; i < rowNum; i++){for (int j = 0; j < columnNum; j++){Matrix3d mt = Matrix3d.Displacement(new Vector3d(j * disColumn, i * disRow, 0));Entity entA = entS.GetTransformedCopy(mt);btr.AppendEntity(entA);trans.AddNewlyCreatedDBObject(entA, true);entList.Add(entA);}}trans.Commit();}return entList; }else{return entS.ArrayRectEntity(rowNum, columnNum, disRow, disColumn);}}public static List<Entity> ArrayPolarEntity(this ObjectId entId, int num, double degree,Point3d center){//声明一个List集合,用于返回List<Entity> entList = new List<Entity>();//打开事务处理using (Transaction trans = entId.Database.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(entId.Database.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);Entity ent = (Entity)entId.GetObject(OpenMode.ForWrite);//限定阵列角度的大小degree = degree > 360 ? 360 : degree;degree = degree < -360 ? -360 : degree;int divAngNum = num-1;if (degree == 360 || degree == -360){divAngNum = num;}for (int i = 0; i < num; i++){Matrix3d mt = Matrix3d.Rotation((i * degree / divAngNum).DegreeToAngle(), Vector3d.ZAxis, center);Entity entA = ent.GetTransformedCopy(mt);btr.AppendEntity(entA);trans.AddNewlyCreatedDBObject(entA, true);entList.Add(entA);}ent.Erase();trans.Commit();}return entList;}/// <summary>/// /// </summary>/// <param name="ent"></param>/// <param name="num"></param>/// <param name="degree"></param>/// <param name="center"></param>/// <returns></returns>public static List<Entity> ArrayPolarEntity(this Entity ent, int num, double degree, Point3d center){if (ent.IsNewObject == true){//声明一个List集合,用于返回List<Entity> entList = new List<Entity>();Database db = HostApplicationServices.WorkingDatabase;using (Transaction trans = db.TransactionManager.StartTransaction()){//打开块表BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);//打开块表记录BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);degree = degree > 360 ? 360 : degree;degree = degree < -360 ? -360 : degree;int divAngNum = num - 1;if (degree == 360 || degree == -360){divAngNum = num;}for (int i = 0; i < num; i++){Matrix3d mt = Matrix3d.Rotation((i * degree / divAngNum).DegreeToAngle(), Vector3d.ZAxis, center);Entity entA = ent.GetTransformedCopy(mt);btr.AppendEntity(entA);trans.AddNewlyCreatedDBObject(entA, true);entList.Add(entA);}trans.Commit();}return entList;}else{return ent.ObjectId.ArrayPolarEntity(num, degree, center);}}}
}

改变图形颜色

       [CommandMethod("EditDemo")]public void EditDemo(){Database db = HostApplicationServices.WorkingDatabase;//db.AddCircleModelSpace(new Point3d(100, 100, 0), 50);Circle c1 = new Circle(new Point3d(100, 100, 0), new Vector3d(0, 0, 1), 50);Circle c2 = new Circle(new Point3d(200, 100, 0), new Vector3d(0, 0, 1), 50);db.AddEntityToModelSpace(c1);c1.ChangeEntityColor(1);c2.ChangeEntityColor(6);db.AddEntityToModelSpace(c2);}

在这里插入图片描述

移动图形

 [CommandMethod("MoveDemo")]public void MoveDemo(){Database db = HostApplicationServices.WorkingDatabase;Circle c1 = new Circle(new Point3d(100, 100, 0), new Vector3d(0, 0, 1), 50);Circle c2 = new Circle(new Point3d(100, 100, 0), new Vector3d(0, 0, 1), 50);Circle c3 = new Circle(new Point3d(100, 100, 0), new Vector3d(0, 0, 1), 50);Point3d p1 = new Point3d(100, 100, 0);Point3d p2 = new Point3d(200, 300, 0);//c2.Center = new Point3d(c2.Center.X + p2.X - p1.X, c2.Center.Y + p2.Y - p1.Y, 0);//db.AddEnityToModelSpace(c1, c2);db.AddEnityToModelSpace(c1,c2);c2.MoveEntity(p1, p2);c3.MoveEntity(p2, p1);db.AddEnityToModelSpace(c3);}## 复制图形```csharp
//复制图形
[CommandMethod("CopyDemo")]
public void CopyDemo()
{Database db = HostApplicationServices.WorkingDatabase;Circle c1 = new Circle(new Point3d(100, 100, 0), Vector3d.ZAxis, 100);Circle c2 = (Circle)c1.CopyEntity(new Point3d(100, 100, 0), new Point3d(100, 200, 0));db.AddEnityToModelSpace(c1,c2);Circle c3 = (Circle)c1.CopyEntity(new Point3d(0, 0, 0), new Point3d(-100, 0, 0));db.AddEnityToModelSpace(c3);
}

旋转图形

//旋转图形
[CommandMethod("RotateDemo")]
public void RotateDemo()
{Database db = HostApplicationServices.WorkingDatabase;Line l1 = new Line(new Point3d(100, 100, 0), new Point3d(300, 100, 0));Line l2 = new Line(new Point3d(100, 100, 0), new Point3d(300, 100, 0));Line l3 = new Line(new Point3d(100, 100, 0), new Point3d(300, 100, 0));l1.RotateEntity(new Point3d(100, 100, 0), 30);db.AddEnityToModelSpace(l1,l2,l3);l2.RotateEntity(new Point3d(0, 0, 0), 60);l3.RotateEntity(new Point3d(200, 500, 0), 90);
}

镜像图形

[CommandMethod("MirrorDemo1")]
public void MirrorDemo1()
{Database db = HostApplicationServices.WorkingDatabase;Circle c1 = new Circle(new Point3d(100, 100, 0), Vector3d.ZAxis, 50);ObjectId cId =  db.AddEnityToModelSpace(c1);Entity Ent = cId.MirrorEntity(new Point3d(200, 100, 0), new Point3d(200, 300, 0), true);db.AddEnityToModelSpace(Ent);Circle c2 = new Circle(new Point3d(100, 200, 0), Vector3d.ZAxis, 50);Entity ent2 = c2.MirrorEntity(new Point3d(200, 100, 0), new Point3d(200, 300, 0), true);//Entity ent3 = c2.MirrorEntity(new Point3d(200, 100, 0), new Point3d(200, 300, 0), false);db.AddEnityToModelSpace(c2,ent2);
}

缩放图形

        [CommandMethod("ScaleDemo")]public void ScaleDemo(){Database db = HostApplicationServices.WorkingDatabase;Circle c1 = new Circle(new Point3d(100, 100, 0), Vector3d.ZAxis, 50);db.AddEnityToModelSpace(c1);Circle c2 = new Circle(new Point3d(200, 100, 0), Vector3d.ZAxis, 50);c2.ScaleEntity(new Point3d(200, 100, 0), 0.5);db.AddEnityToModelSpace(c2);Circle c3 = new Circle(new Point3d(300, 100, 0), Vector3d.ZAxis, 50);db.AddEnityToModelSpace(c3);c3.ScaleEntity(new Point3d(0, 0, 0), 2);}

删除图形对象

[CommandMethod("EraseDemo")]
public void EraseDemo()
{Database db = HostApplicationServices.WorkingDatabase;Circle c1 = new Circle(new Point3d(100, 100, 0), Vector3d.ZAxis, 50);Circle c2 = new Circle(new Point3d(200, 100, 0), Vector3d.ZAxis, 50);db.AddEnityToModelSpace(c1, c2);c2.ObjectId.EraseEntity();
}

矩形阵列图形

        [CommandMethod("ArrayRectDemo1")]public void ArrayRectDemo1(){Database db = HostApplicationServices.WorkingDatabase;//ObjectId cirId = db.AddCircleModelSpace(new Point3d(100, 100, 0), 20);//cirId.ArrayRectEntity(5, 6, -50, -50);Circle c = new Circle(new Point3d(100, 100, 0), Vector3d.ZAxis, 10);c.ArrayRectEntity(5, 6, -50, 50);}

环形阵列图形

[CommandMethod("ArrayPolarDemo")]
public void ArrayPolarDemo()
{Database db = HostApplicationServices.WorkingDatabase;//ObjectId lineId = db.AddLineToModelSpace(new Point3d(100, 100, 0), new Point3d(120, 100, 0));//lineId.ArrayPolarEntity(6, 360, new Point3d(100, 200, 0));//ObjectId lineId2 = db.AddLineToModelSpace(new Point3d(500, 100, 0), new Point3d(520, 100, 0));//lineId2.ArrayPolarEntity(6, 350, new Point3d(500, 200, 0));//ObjectId lineId3 = db.AddLineToModelSpace(new Point3d(1000, 100, 0), new Point3d(1020, 100, 0));//lineId3.ArrayPolarEntity(6, -350, new Point3d(1000, 200, 0));Line l = new Line(new Point3d(100, 100, 0), new Point3d(120, 120, 0));l.ArrayPolarEntity(7, -270, new Point3d(110, 300, 0));
}

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

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

相关文章

Leetcode | 5-22 | 每日一题 | 找出输掉零场或一场比赛的玩家

&#x1f525;博客介绍&#xff1a; EvLast &#x1f3a5;系列专栏&#xff1a; 数据结构与算法 , 算法入门 , C项目 , Leetcode_DayCode &#x1f3a5; 当前专栏: Leetcode_DayCode 专题 : 数据结构帮助小白快速入门算法 &#x1f44d;&#x1f44d;&#x1f44d;&#x1…

Go语言之Gorm框架(一) ——初窥Gorm框架

Gorm和Mysql驱动的安装 打开终端&#xff0c;输入下列命令即可&#xff1a; go get gorm.io/driver/mysql go get gorm.io/gormGorm连接数据库 示例 package mainimport ("fmt""github.com/sirupsen/logrus""gorm.io/driver/mysql""gor…

HE TB PPDU MU-RTS

看起来像是MU-RTS的触发帧的应答不是HE TB PPDU&#xff0c;而是传统得的帧&#xff0c;应答CTS。 非AP 的STA&#xff0c;是不能发送触发帧&#xff0c;也就是说&#xff0c;触发帧&#xff0c;只能是由AP发送给STA

AI视频智能分析引领智慧园区升级:EasyCVR智慧园区视频管理方案

一、系统概述与需求 随着信息技术的不断发展&#xff0c;智慧园区作为城市现代化的重要组成部分&#xff0c;对安全监控、智能化管理提出了更高的要求。智慧园区视频智能管理系统作为实现园区智能化管理的重要手段&#xff0c;通过对园区内各关键节点的视频监控和智能分析&…

一文了解安卓内存抖动

目录 目录一、什么是内存抖动&#xff1f;1.1 Android里的内存抖动1.2 如何直观查看这种现象1.3 内存抖动带来的风险 二、如何避免内存抖动 目录 一、什么是内存抖动&#xff1f; 在程序里&#xff0c;每创建一个对象&#xff0c;就会有一块内存分配给它&#xff0c;每分配一…

LabVIEW虚拟测试实验室开发

LabVIEW虚拟测试实验室开发 在当代的科技和工业进步中&#xff0c;测试与测量扮演着至关重要的角色。随着技术的发展&#xff0c;测试系统也变得日益复杂和成本昂贵&#xff0c;同时对测试结果的准确性和测试过程的效率要求越来越高。开发了一种基于LabVIEW的虚拟测试实验室的…

ICQ 将于 6 月关闭,这是一种奇怪的方式,发现它在 2024 年仍然活跃

你知道ICQ还活着吗&#xff1f;不过&#xff0c;不要太兴奋;它将永远消失。 还记得ICQ吗&#xff1f;如果你这样做了&#xff0c;你可能会记得它是AOL在1998年购买的Messenger客户端&#xff0c;就在Yahoo Instant Messager和MSN Messenger加入竞争的时候。然后Skype出现了&…

SpringBoot3笔记(一)SpringBoot3-核心特性

快速学习 SpringBoot 看官方文档&#xff1a; Spring Boot Reference Documentation 计划三天学完 笔记&#xff1a;https://www.yuque.com/leifengyang/springboot3 代码&#xff1a;https://gitee.com/leifengyang/spring-boot-3 一、SpringBoot3 - 快速入门 1.1 简介 …

【全开源】招聘求职小程序系统源码(ThinkPHP+原生微信小程序)

基于ThinkPHP和原生微信小程序开发的招聘平台系统&#xff0c;包含微信小程序求职者端、微信小程序企业招聘端、PC企业招聘端、PC管理平台端 构建高效人才交流平台 一、引言&#xff1a;招聘求职市场的数字化趋势 在数字化时代&#xff0c;招聘求职市场也迎来了巨大的变革。…

仅需一块 4GB 的 GPU ,就能运行开源大语言模型:Llama3 70B

最强的开源大语言模型 Llama3 已经发布一段时间了&#xff0c;一些盆友资源有限&#xff0c;私信询问是否可以使用 4GB 的 VRAM 在本地运行 Llama3 70B。 与 GPT-4 相比&#xff0c;Llama3 的性能如何&#xff1f;Llama3 使用了哪些关键的前沿技术使其变得如此强大&#xff1f…

GDB对Linux信号的处理方式

前言 在软件开发过程中&#xff0c;调试工具是程序员不可或缺的助手。GDB&#xff08;GNU Debugger&#xff09;作为一个强大的调试器&#xff0c;广泛应用于Linux系统中的C/C程序调试。然而&#xff0c;信号处理机制的复杂性常常给调试带来挑战。特别是在处理异步和同步信号时…

深入理解指针(5)

在之前的深入理解指针(4)中我们学习了回调函数相关知识&#xff0c;并且学会了如何使用库函数qsort&#xff0c;以及模拟实现了qsort&#xff0c;接下来在本篇中将对srtlen和sizeof进行细致的讲解&#xff0c;并对相关的题型进行讲解&#xff0c;一起加油吧&#xff01;&#x…

开放式耳机哪个品牌音质好用又实惠耐用?五大公认卷王神器直入!

​在现今耳机市场&#xff0c;开放式耳机凭借其舒适的佩戴体验和独特的不入耳设计&#xff0c;备受消费者追捧。它们不仅让你在享受音乐时&#xff0c;仍能察觉周围的声音&#xff0c;确保与人交流无障碍&#xff0c;而且有利于耳朵的卫生与健康。对于运动爱好者和耳机发烧友而…

ASP+ACCESS酒店房间预约系统设计

摘要 随着国内经济形势持续发展&#xff0c;国内酒店业进入难得的发展高峰期&#xff0c;使得中外资本家纷纷将目光投向中低端市场。然而&#xff0c;中国酒店业的区域结构不合理、竞争手段不足和市场对经济型酒店的需求日益显露&#xff0c;以及2008年北京奥运会、2010年上海…

数据分析工程师——什么是数据分析?

数据分析工程师 对于目前就业市场上的技术岗位,除了开发、测试、运维等常见职位之外,数据类岗位也越来越成为热门的求职方向。本文将重点介绍 数据分析 这一新兴岗位。 看到「数据分析」这几个字,也许大家的第一印象一样,觉得要做的工作似乎并不难,有大量数据后根据业务…

状态转换图

根据本章开头讲的结构化分析的第3条准则,在需求分析过程中应该建立起软件系统的行为模型。状态转换图(简称为状态图)通过描绘系统的状态及引起系统状态转换的事件,来表示系统的行为。此外,状态图还指明了作为特定事件的结果系统将做哪些动作(例如,处理数据)。因此,状态图提供了…

JS闭包、原型链简单理解

目录 1.闭包概念 1.1简单demo1: 1.2简单demo2 1.3使用let代替var解决这个问题 2.函数对象和原型链 ​编辑 2.1函数对象demo 2.2.原型链demo 3.使用闭包完成JQuery的一个小demo 1.闭包概念 1.当函数声明时&#xff0c;函数会通过内部属性[scope]来创建范围 2.闭包一个…

Android窗口管理

一 概述 本篇文章主要讲 Window、WindowManager、WindowManagerService 三者之间的关系及其运行机制。总的来说 Window 表示的是一种抽象的功能集合&#xff0c;具体实现为 PhoneWindow。WindowManager 是外界访问 Window 的入口&#xff0c;对 Window 的访问必须通过 Window…

微信小程序预览图片和H5使用canvas实现图片+蒙层+文字

1、效果 2.H5实现 <!--* Author: limingfang* Date: 2024-05-20 10:26:51* LastEditors: limingfang* LastEditTime: 2024-05-21 16:31:11* Description: --> <!DOCTYPE html> <html lang"en"> <head> <meta charset"UTF-8&q…

C++ | Leetcode C++题解之第112题路径总和

题目&#xff1a; 题解&#xff1a; class Solution { public:bool hasPathSum(TreeNode *root, int sum) {if (root nullptr) {return false;}if (root->left nullptr && root->right nullptr) {return sum root->val;}return hasPathSum(root->left…