Mars3d采用ellipsoid球实现模拟地球旋转效果

1.Mars3d采用ellipsoid球实现模拟地球旋转效果

2.开始自选装之后,模型一直闪烁

http://mars3d.cn/editor-vue.html?id=graphic/entity/ellipsoid

3.相关代码:

import * as mars3d from "mars3d"export let map // mars3d.Map三维地图对象
export let graphicLayer // 矢量图层对象
export const eventTarget = new mars3d.BaseClass()export const mapOptions = {scene: {center: { lat: 30.606438, lng: 116.329605, alt: 53280, heading: 0, pitch: -60 }}
}
/*** 初始化地图业务,生命周期钩子函数(必须)* 框架在地图初始化完成后自动调用该函数* @param {mars3d.Map} mapInstance 地图对象* @returns {void} 无*/
export function onMounted(mapInstance) {map = mapInstance // 记录map// 创建矢量数据图层graphicLayer = new mars3d.layer.GraphicLayer()map.addLayer(graphicLayer)// 在layer上绑定监听事件graphicLayer.on(mars3d.EventType.click, function (event) {console.log("监听layer,单击了矢量对象", event)})bindLayerPopup() // 在图层上绑定popup,对所有加到这个图层的矢量数据都生效bindLayerContextMenu() // 在图层绑定右键菜单,对所有加到这个图层的矢量数据都生效// 加一些演示数据
//   addDemoGraphic1(graphicLayer)addDemoGraphic2(graphicLayer)
//   addDemoGraphic3(graphicLayer)
//   addDemoGraphic3b(graphicLayer)
//   addDemoGraphic4(graphicLayer)
//   addDemoGraphic5(graphicLayer)
//   addDemoGraphic6(graphicLayer)
//   addDemoGraphic7(graphicLayer)
//   addDemoGraphic8(graphicLayer)
//   addDemoGraphic9(graphicLayer)
//   addDemoGraphic10(graphicLayer)
//   addDemoGraphic11(graphicLayer)
//   addDemoGraphic12(graphicLayer)
//   addDemoGraphic13(graphicLayer)
//   addDemoGraphic14(graphicLayer)
}/*** 释放当前地图业务的生命周期函数* @returns {void} 无*/
export function onUnmounted() {map = nullgraphicLayer.remove()graphicLayer = null
}//
function addDemoGraphic1(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: [116.1, 31.0, 1000],style: {radii: new Cesium.Cartesian3(1000.0, 1000.0, 1500.0),color: "#00ff00",opacity: 0.5,label: { text: "鼠标移入会高亮", pixelOffsetY: -30 },// 高亮时的样式(默认为鼠标移入,也可以指定type:'click'单击高亮),构造后也可以openHighlight、closeHighlight方法来手动调用highlight: {opacity: 0.9}},attr: { remark: "示例1" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)// 演示个性化处理graphicinitGraphicManager(graphic)
}
// 也可以在单个Graphic上做个性化管理及绑定操作
function initGraphicManager(graphic) {// 3.在graphic上绑定监听事件// graphic.on(mars3d.EventType.click, function (event) {//   console.log("监听graphic,单击了矢量对象", event)// })// 绑定Tooltip// graphic.bindTooltip('我是graphic上绑定的Tooltip') //.openTooltip()// 绑定Popupconst inthtml = `<table style="width: auto;"><tr><th scope="col" colspan="2" style="text-align:center;font-size:15px;">我是graphic上绑定的Popup </th></tr><tr><td>提示:</td><td>这只是测试信息,可以任意html</td></tr></table>`graphic.bindPopup(inthtml).openPopup()// 绑定右键菜单graphic.bindContextMenu([{text: "删除对象[graphic绑定的]",icon: "fa fa-trash-o",callback: (e) => {const graphic = e.graphicif (graphic) {graphic.remove()}}}])// 测试 颜色闪烁if (graphic.startFlicker) {graphic.startFlicker({time: 20, // 闪烁时长(秒)maxAlpha: 0.5,color: Cesium.Color.YELLOW,onEnd: function () {// 结束后回调}})}
}//
function addDemoGraphic2(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.2, 31.0, 1000),style: {radii: new Cesium.Cartesian3(1000.0, 1000.0, 1000.0),color: Cesium.Color.RED.withAlpha(0.5),outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例2" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)// 设置自转动画map.viewer.clock.onTick.addEventListener(function(clock) {var time = clock.currentTime;var multiplier = 1; // 时间流速倍数,可以根据需要调整// 计算地球的旋转角度var angle = window.Cesium.Math.TWO_PI * multiplier * time.secondsOfDay / 86400;// 设置EllipsoidEntity的旋转角度// const a = window.Cesium.Quaternion.fromAxisAngle(window.Cesium.Cartesian3.UNIT_Z, angle);graphic.entity.orientation.setValue(window.Cesium.Quaternion.fromAxisAngle(window.Cesium.Cartesian3.UNIT_Z, angle));// graphic.orientation = window.Cesium.Quaternion.fromAxisAngle(window.Cesium.Cartesian3.UNIT_Z, angle);});
}function addDemoGraphic3(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.307258, 30.999546, 1239.2),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),maximumConeDegree: 90,materialType: mars3d.MaterialType.EllipsoidElectric,materialOptions: {color: Cesium.Color.GREEN,speed: 5.0}},attr: { remark: "示例3" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)
}function addDemoGraphic3b(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.303345, 31.087028, 452.2),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),maximumConeDegree: 90,materialType: mars3d.MaterialType.EllipsoidWave,materialOptions: {color: "#00ffff",speed: 5.0}}})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)
}//
function addDemoGraphic4(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: [116.4, 31.0, 1000],style: {radii: new Cesium.Cartesian3(2500.0, 2500.0, 2500.0),innerRadii: new Cesium.Cartesian3(10.0, 10.0, 10.0),minimumClockDegree: -15.0,maximumClockDegree: 15.0,minimumConeDegree: 75.0,maximumConeDegree: 105.0,pitch: 30,color: "#f33349",opacity: 0.9,outline: true,outlineColor: "rgba(255,255,255,0.5)",label: {text: "我是原始的",font_size: 18,color: "#ffffff",pixelOffsetY: -10,distanceDisplayCondition: true,distanceDisplayCondition_far: 500000,distanceDisplayCondition_near: 0}},attr: { remark: "示例4" }})graphicLayer.addGraphic(graphic)// graphic转geojsonconst geojson = graphic.toGeoJSON()console.log("转换后的geojson", geojson)addGeoJson(geojson, graphicLayer)
}// 添加单个geojson为graphic,多个直接用graphicLayer.loadGeoJSON
function addGeoJson(geojson, graphicLayer) {const graphicCopy = mars3d.Util.geoJsonToGraphics(geojson)[0]delete graphicCopy.attr// 新的坐标graphicCopy.position = [116.5, 31.0, 1000]graphicCopy.style.label = graphicCopy.style.label || {}graphicCopy.style.label.text = "我是转换后生成的"graphicLayer.addGraphic(graphicCopy)
}// 2圈平面扇形
function addDemoGraphic5(graphicLayer) {const outerRadius = 5000.0const innerRadius = 1000const graphic = new mars3d.graphic.EllipsoidEntity({position: [116.1, 30.9, 1000],style: {radii: new Cesium.Cartesian3(outerRadius, outerRadius, outerRadius),innerRadii: new Cesium.Cartesian3(innerRadius, innerRadius, innerRadius),minimumClockDegree: -20.0,maximumClockDegree: 20.0,minimumConeDegree: 90,maximumConeDegree: 90,color: "rgba(255,255,0,0.2)",outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例5" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)
}// 半圆顶球体
function addDemoGraphic6(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.2, 30.9, 1000),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),maximumConeDegree: 90,color: Cesium.Color.BLUE.withAlpha(0.3),outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例6" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)
}// 含内半径 半圆顶球体
function addDemoGraphic7(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.3, 30.9, 1000),style: {radii: new Cesium.Cartesian3(2500.0, 2000.0, 1500.0),innerRadii: new Cesium.Cartesian3(1000.0, 800.0, 600.0),maximumConeDegree: 90,color: Cesium.Color.RED.withAlpha(0.3),outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例7" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)
}// 被切开的含内半径 半圆顶球体
function addDemoGraphic8(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.4, 30.9, 1000),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),innerRadii: new Cesium.Cartesian3(1000.0, 1000.0, 1000.0),minimumConeDegree: 20.0,maximumConeDegree: 90,color: Cesium.Color.YELLOW.withAlpha(0.3),outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例8" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)
}// 顶部和底部切出的桶形体
function addDemoGraphic9(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.5, 30.9, 1000),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),innerRadii: new Cesium.Cartesian3(1000.0, 1000.0, 1000.0),minimumConeDegree: 60.0,maximumConeDegree: 140.0,color: "rgba(31,254,230,0.3)",outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例9" }})graphicLayer.addGraphic(graphic)
}// 碗行体
function addDemoGraphic10(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.1, 30.8, 1000),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),innerRadii: new Cesium.Cartesian3(1800.0, 1800.0, 1800.0),minimumConeDegree: 110.0,color: "rgba(149,228,12,0.3)",outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例10" }})graphicLayer.addGraphic(graphic)
}// 时钟开孔
function addDemoGraphic11(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.2, 30.8, 1000),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),innerRadii: new Cesium.Cartesian3(1500.0, 1500.0, 1500.0),minimumClockDegree: -90.0,maximumClockDegree: 180.0,minimumConeDegree: 20.0,maximumConeDegree: 70.0,color: "rgba(149,228,12,0.3)",outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例11" }})graphicLayer.addGraphic(graphic)
}// 局部圆顶
function addDemoGraphic12(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.3, 30.8, 1000),style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),minimumClockDegree: -90.0,maximumClockDegree: 180.0,maximumConeDegree: 90.0,color: "rgba(242,250,25,0.3)",outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例12" }})graphicLayer.addGraphic(graphic)
}// 部分椭圆体
function addDemoGraphic13(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.4, 30.8, 1000),style: {radii: new Cesium.Cartesian3(3000.0, 3000.0, 3000.0),innerRadii: new Cesium.Cartesian3(700.0, 700.0, 700.0),minimumClockDegree: 180.0,maximumClockDegree: 400.0,maximumConeDegree: 90.0,color: "rgba(247,154,44,0.3)",outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例13" }})graphicLayer.addGraphic(graphic)
}// 土星综合对象
function addDemoGraphic14(graphicLayer) {const position = new mars3d.LngLatPoint(116.5, 30.8, 1000)const graphic = new mars3d.graphic.EllipsoidEntity({name: "土星",position: position,style: {radii: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),color: new Cesium.Color(0.95, 0.82, 0.49)},attr: { remark: "示例14" }})graphicLayer.addGraphic(graphic)const graphicNei = new mars3d.graphic.EllipsoidEntity({name: "土星的内圈",position: position,style: {radii: new Cesium.Cartesian3(4000.0, 4000.0, 4000.0),innerRadii: new Cesium.Cartesian3(3000.0, 3000.0, 3000.0),minimumConeDegree: 89.8,maximumConeDegree: 90.2,color: new Cesium.Color(0.95, 0.82, 0.49, 0.5),heading: 30,pitch: 30}})graphicLayer.addGraphic(graphicNei)const graphicWai = new mars3d.graphic.EllipsoidEntity({name: "土星外圈",position: position,style: {radii: new Cesium.Cartesian3(4600.0, 4600.0, 4600.0),innerRadii: new Cesium.Cartesian3(4150.0, 4150.0, 4150.0),minimumConeDegree: 89.8,maximumConeDegree: 90.2,color: new Cesium.Color(0.95, 0.82, 0.49, 0.5),heading: 30,pitch: 30}})graphicLayer.addGraphic(graphicWai)
}// 生成演示数据(测试数据量)
export function addRandomGraphicByCount(count) {graphicLayer.clear()graphicLayer.enabledEvent = false // 关闭事件,大数据addGraphic时影响加载时间const bbox = [116.984788, 31.625909, 117.484068, 32.021504]const result = mars3d.PolyUtil.getGridPoints(bbox, count, 30)console.log("生成的测试网格坐标", result)const radius = result.radiusfor (let j = 0; j < result.points.length; ++j) {const position = result.points[j]const index = j + 1const graphic = new mars3d.graphic.EllipsoidEntity({position: position,style: {radii: new Cesium.Cartesian3(radius, radius, radius),color: Cesium.Color.fromRandom({ alpha: 0.6 })},attr: { index: index }})graphicLayer.addGraphic(graphic)}graphicLayer.enabledEvent = true // 恢复事件return result.points.length
}// 开始绘制
export function startDrawGraphic() {graphicLayer.startDraw({type: "ellipsoid",style: {color: "rgba(0,255,255,0.6)"}})
}// 在图层绑定Popup弹窗
export function bindLayerPopup() {graphicLayer.bindPopup(function (event) {const attr = event.graphic.attr || {}attr["类型"] = event.graphic.typeattr["来源"] = "我是layer上绑定的Popup"attr["备注"] = "我支持鼠标交互"return mars3d.Util.getTemplateHtml({ title: "矢量图层", template: "all", attr: attr })})
}// 绑定右键菜单
export function bindLayerContextMenu() {graphicLayer.bindContextMenu([{text: "开始编辑对象",icon: "fa fa-edit",show: function (e) {const graphic = e.graphicif (!graphic || !graphic.hasEdit) {return false}return !graphic.isEditing},callback: (e) => {const graphic = e.graphicif (!graphic) {return false}if (graphic) {graphicLayer.startEditing(graphic)}}},{text: "停止编辑对象",icon: "fa fa-edit",show: function (e) {const graphic = e.graphicif (!graphic || !graphic.hasEdit) {return false}return graphic.isEditing},callback: (e) => {const graphic = e.graphicif (!graphic) {return false}if (graphic) {graphic.stopEditing()}}},{text: "删除对象",icon: "fa fa-trash-o",show: (event) => {const graphic = event.graphicif (!graphic || graphic.isDestroy) {return false} else {return true}},callback: (e) => {const graphic = e.graphicif (!graphic) {return}const parent = graphic.parent // 右击是编辑点时graphicLayer.removeGraphic(graphic)if (parent) {graphicLayer.removeGraphic(parent)}}}])
}

 

4.采用属性机制即可实现球体模拟地球旋转的效果:

采用属性机制即可

 function addDemoGraphic2(graphicLayer) {const graphic = new mars3d.graphic.EllipsoidEntity({position: new mars3d.LngLatPoint(116.2, 31.0, 1000),style: {radii: new Cesium.Cartesian3(1000.0, 1000.0, 1000.0),color: Cesium.Color.RED.withAlpha(0.5),outline: true,outlineColor: "rgba(255,255,255,0.5)"},attr: { remark: "示例2" }})graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)// 设置自转动画let anglemap.on(mars3d.EventType.clockTick, function (clock) {angle = (Cesium.Math.TWO_PI * clock.multiplier * clock.currentTime.secondsOfDay) / 86400 // 计算旋转角度})graphic.entity.orientation = new Cesium.CallbackProperty((time) => {return Cesium.Quaternion.fromAxisAngle(Cesium.Cartesian3.UNIT_Z, angle)}, false)}

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

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

相关文章

深入浅出如何通过API瞬间搭建亿万商品外贸代购系统PHP系统

什么是淘宝代购 淘宝代购是近年兴起的一种购物模式&#xff0c;是帮国外客户购买中国商品。主要是通过万邦 科技的外贸代购系统&#xff0c;把淘宝、天猫等电商平台的全站商品通过API 接入到你的网站 上&#xff0c;瞬间就可以架设一个有数亿产品的大型网上商城&#xff0c;而…

2023年测试之路,从功能测试进阶测试开发工程师,突破内卷...

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 测试开发工程师到…

Redis可视化工具(Redis Desktop Manager)

redis是我们平时开发工作中经常用到的非关系型数据库&#xff0c;常用于做数据缓存&#xff0c;分布式锁等。 为了更方便的使用redi&#xff0c;这里给大家推荐一款可视化工具&#xff1a;Redis Desktop Manager。 1.下载与安装 直接到gihub下载&#xff0c;地址 Release 0.…

uni-app的H5版本下载跨域问题

前端能正常访问图片&#xff0c;但无法下载 因为路径不经过业务代码&#xff0c;所以需要在nginx配置跨域 代码&#xff1a; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods GET, POST, OPTIONS; add_header Access-Control-Allow-H…

基于simulink的DPLL仿真笔记

该笔记主要用于本人思路整理与记录 本设计运用的是电荷泵一阶环路滤波器&#xff0c;二阶三阶则在此基础上举一反三&#xff0c;以后如有机会会慢慢补全 文章目录 一.仿真模型PS&#xff08;题外话&#xff09; 二.仿真结果三.环路滤波器分析1. 环路滤波器对比LPF2. 环路滤波器…

Shikra:新一代多模态大语言模型,理解指向,说出坐标

“ Shikra&#xff1a;解锁多模态语言模型参考对话的魔法” Shikra和用户的对话案例 在人类的日常交流中&#xff0c;经常会关注场景中的不同区域或物体&#xff0c;双方都可以通过说话并指向这些区域来进行高效的信息交换。我们将这种对话模式称为参考对话&#xff08;Referen…

uniapp自定义头部,计算状态栏和导航栏高度超简单三步

效果图 1.pages.json 页面给要自定义头部的页面加入一行代码 "navigationStyle":"custom" {"path": "pages/index/index","style": {"navigationBarTitleText": "","navigationStyle":"…

Gin+Gorm练手小项目bubble清单企业级结构剖析

概述 本项目来源于Qimi老师的小清单项目——基于gingorm开发的练手小项目&#xff0c;通过该项目可初识go web开发该有的姿势。笔者对代码有些许修改&#xff0c;以下是项目成功运行的截图&#xff0c;主要功能有添加&#xff0c;删除&#xff0c;确认&#xff0c;查看待办事项…

有哪些记事本app可以用来整理个人笔记?

我总是在思考一个问题&#xff0c;为什么现在越来越多的人选择使用记事本app&#xff1f;它们相比传统笔记本&#xff0c;又有什么吸引人的地方呢&#xff1f;这其实并不难理解。因为&#xff0c;记事本app不仅可以让我们及时记录重要信息&#xff0c;还能对这些信息进行系统、…

Django实现接口自动化平台(九)环境envs序列化器及视图【持续更新中】

相关文章&#xff1a; Django实现接口自动化平台&#xff08;八&#xff09;测试报告reports序列化器及视图【持续更新中】_做测试的喵酱的博客-CSDN博客 本章是项目的一个分解&#xff0c;查看本章内容时&#xff0c;要结合整体项目代码来看&#xff1a; python django vue …

mac 下 geoserver 安装

一、去官网下载geoserver https://geoserver.org/ 选择一个版本&#xff0c;然后点进去 二、需要配置java环境和设置geoserver 环境变量 1&#xff09;、java 环境安装 Java Downloads | Oracle 中国 2&#xff09;、环境变量设置 1.打开终端&#xff1a;command 空格键 2…

Python自动获取字母站视频

如果有疑问的话可以在我的谈论群&#xff1a;706128290 来找我 目录 前言 二、编写代码 1.引入库 2.编写主类 3. 自动获取cookies值和生成headers 4.获取命令行参数 运行效果 前言 browser_cookie3 第三方模块 browser_cookie3是browser_cookie模块的分支&#xff0c;…

jupyter notebook更换虚拟环境(内核)

jupyter notebook更换虚拟环境&#xff08;内核&#xff09; 创建一个新的虚拟环境 # stk_env 虚拟环境的名字&#xff0c;任取。 conda create -n stkenv python3.9激活虚拟环境 conda activate stkenv安装ipykernel # 为该虚拟环境&#xff0c;安装内核。 conda install -c a…

基于C语言设计的足球信息查询系统

完整资料进入【数字空间】查看——baidu搜索"writebug" 需求分析与概要设计 2.1 项目说明 我们小组的选题主要是面向足球爱好者&#xff0c;在普通社交软件的基础之上&#xff0c;围绕足球的主题展开设计&#xff0c;以便于他们能够更好的交流相关的话题&#xff…

linux之Ubuntu系列(六)用户管理 终端命令 which 查看执行命令所在的位置

提示 /etc/passwd 是用于保存用户信息的文件 可以用cat 命令查看 cat /etc/passwd/usr/bin/passwd 是用于修改用户密码的 程序 &#xff0c;是程序 程序 &#xff0c; which 命令 可以查看执行命令所在的位置 # 输出 /bin/ls which ls # 输出 /usr/sbin/useradd which useradd…

git clone 或者是vscode clone 时遇到the remote end hung up unexpectedly

fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed使用git clone总是报错 查看原因有三种可能&#xff1a;要么是缓存不够&#xff0c;要么是网络不行&#xff0c;要么墙的原因。 如果是网络不行&#xff0c;可以配置git的最低速度和最…

re学习(19)[ACTF新生赛2020]easyre1(UPX脱壳)

文章链接&#xff1a;BUUCTF在线评测 参考视频&#xff1a;B站 【新手教程三】小Z带你学习什么是ESP定律和什么是堆栈平衡 &#xff1f; - 『脱壳破解区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn 题解&#xff1a; 工具脱壳 key"*F\"N,\"…

MYSQL数据库-数据库的学习

MYSQL数据库-数据库的学习 MYSQL数据库一、数据库的基本概念二、常见的数据库三、MySQL数据库四、SQL操作五、SQL高级操作六、SQL函数&#xff08;SQL 拥有很多可用于计数和计算的内建函数) MYSQL数据库 一、数据库的基本概念 1、数据库的英文单词:DataBase 简称 : DB 2、什么…

C#基础--进程和线程的认识

C#基础–进程和线程的认识 一、基础概念 1. 什么是进程? 进程并不是物理的东西,是虚拟出来的,是一种概念。当一个程序开始运行时,它就是一个进程,进程包括运行中的程序和程序所使用到的内存和系统资源。而一个进程又是由多个线程所组成的。是一种计算机概念,是程序在运…

【矩阵的创建与基本运算】——matlab基础

目录索引 创建矩阵&#xff1a;zeros()&#xff1a;ones&#xff1a;eye()&#xff1a;magic()&#xff1a;引号创建序列矩阵&#xff1a;linspace()&#xff1a; 加减与数乘&#xff1a;其他运算&#xff1a;指数运算&#xff1a;*exp()&#xff1a;* 点式运算&#xff1a; 创…