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

乐尚代驾六订单执行一

加载当前订单

需求

  • 无论是司机端,还是乘客端,遇到页面切换,重新登录小程序等,只要回到首页面,查看当前是否有正在执行订单,如果有跳转到当前订单执行页面

  • 之前这个接口已经开发,为了测试,临时跳过去,默认没有当前订单的

乘客端查找当前订单

@Operation(summary = "乘客端查找当前订单")
@GetMapping("/searchCustomerCurrentOrder/{customerId}")
public Result<CurrentOrderInfoVo> searchCustomerCurrentOrder(@PathVariable Long customerId) {return Result.ok(orderInfoService.searchCustomerCurrentOrder(customerId));
}//乘客端查找当前订单
@Override
public CurrentOrderInfoVo searchCustomerCurrentOrder(Long customerId) {//封装条件//乘客idLambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();wrapper.eq(OrderInfo::getCustomerId,customerId);//各种状态// 这些状态都表明该订单在执行中,所以要所有状态都查询Integer[] statusArray = {OrderStatus.ACCEPTED.getStatus(),OrderStatus.DRIVER_ARRIVED.getStatus(),OrderStatus.UPDATE_CART_INFO.getStatus(),OrderStatus.START_SERVICE.getStatus(),OrderStatus.END_SERVICE.getStatus(),OrderStatus.UNPAID.getStatus()};wrapper.in(OrderInfo::getStatus,statusArray);//获取最新一条记录wrapper.orderByDesc(OrderInfo::getId);wrapper.last(" limit 1");//调用方法OrderInfo orderInfo = orderInfoMapper.selectOne(wrapper);//封装到CurrentOrderInfoVoCurrentOrderInfoVo currentOrderInfoVo = new CurrentOrderInfoVo();if(orderInfo != null) {currentOrderInfoVo.setOrderId(orderInfo.getId());currentOrderInfoVo.setStatus(orderInfo.getStatus());currentOrderInfoVo.setIsHasCurrentOrder(true);} else {currentOrderInfoVo.setIsHasCurrentOrder(false);}return currentOrderInfoVo;
}/*** 乘客端查找当前订单* @param customerId* @return*/
@GetMapping("/order/info/searchCustomerCurrentOrder/{customerId}")
Result<CurrentOrderInfoVo> searchCustomerCurrentOrder(@PathVariable("customerId") Long customerId);@Operation(summary = "乘客端查找当前订单")
@GuiguLogin
@GetMapping("/searchCustomerCurrentOrder")
public Result<CurrentOrderInfoVo> searchCustomerCurrentOrder() {Long customerId = AuthContextHolder.getUserId();return Result.ok(orderService.searchCustomerCurrentOrder(customerId));
}//乘客查找当前订单
@Override
public CurrentOrderInfoVo searchCustomerCurrentOrder(Long customerId) {return orderInfoFeignClient.searchCustomerCurrentOrder(customerId).getData();
}

司机端查找当前订单

@Operation(summary = "司机端查找当前订单")
@GetMapping("/searchDriverCurrentOrder/{driverId}")
public Result<CurrentOrderInfoVo> searchDriverCurrentOrder(@PathVariable Long driverId) {return Result.ok(orderInfoService.searchDriverCurrentOrder(driverId));
}//司机端查找当前订单
@Override
public CurrentOrderInfoVo searchDriverCurrentOrder(Long driverId) {//封装条件LambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();wrapper.eq(OrderInfo::getDriverId,driverId);Integer[] statusArray = {OrderStatus.ACCEPTED.getStatus(),OrderStatus.DRIVER_ARRIVED.getStatus(),OrderStatus.UPDATE_CART_INFO.getStatus(),OrderStatus.START_SERVICE.getStatus(),OrderStatus.END_SERVICE.getStatus()};wrapper.in(OrderInfo::getStatus,statusArray);wrapper.orderByDesc(OrderInfo::getId);wrapper.last(" limit 1");OrderInfo orderInfo = orderInfoMapper.selectOne(wrapper);//封装到voCurrentOrderInfoVo currentOrderInfoVo = new CurrentOrderInfoVo();if(null != orderInfo) {currentOrderInfoVo.setStatus(orderInfo.getStatus());currentOrderInfoVo.setOrderId(orderInfo.getId());currentOrderInfoVo.setIsHasCurrentOrder(true);} else {currentOrderInfoVo.setIsHasCurrentOrder(false);}return currentOrderInfoVo;
}/*** 司机端查找当前订单* @param driverId* @return*/
@GetMapping("/order/info/searchDriverCurrentOrder/{driverId}")
Result<CurrentOrderInfoVo> searchDriverCurrentOrder(@PathVariable("driverId") Long driverId);@Operation(summary = "司机端查找当前订单")
@GuiguLogin
@GetMapping("/searchDriverCurrentOrder")
public Result<CurrentOrderInfoVo> searchDriverCurrentOrder() {Long driverId = AuthContextHolder.getUserId();return Result.ok(orderService.searchDriverCurrentOrder(driverId));
}@Override
public CurrentOrderInfoVo searchDriverCurrentOrder(Long driverId) {return orderInfoFeignClient.searchDriverCurrentOrder(driverId).getData();
}

获取订单信息

进入首页,在有执行中订单的情况下,我们需要获取订单信息,才能知道页面跳转到那里去,因此现在把这个接口给实现了。

  • 订单的各个状态,获取的订单信息不一样,当前我们只是获取订单基本信息,后续完善
@Operation(summary = "根据订单id获取订单信息")
@GetMapping("/getOrderInfo/{orderId}")
public Result<OrderInfo> getOrderInfo(@PathVariable Long orderId) {return Result.ok(orderInfoService.getById(orderId));
}/*** 远程调用* 根据订单id获取订单信息* @param orderId* @return*/
@GetMapping("/order/info/getOrderInfo/{orderId}")
Result<OrderInfo> getOrderInfo(@PathVariable("orderId") Long orderId);// 乘客端web接口
@Operation(summary = "获取订单信息")
@GuiguLogin
@GetMapping("/getOrderInfo/{orderId}")
public Result<OrderInfoVo> getOrderInfo(@PathVariable Long orderId) {Long customerId = AuthContextHolder.getUserId();return Result.ok(orderService.getOrderInfo(orderId, customerId));
}@Override
public OrderInfoVo getOrderInfo(Long orderId, Long customerId) {OrderInfo orderInfo = orderInfoFeignClient.getOrderInfo(orderId).getData();//判断if(orderInfo.getCustomerId() != customerId) {throw new GuiguException(ResultCodeEnum.ILLEGAL_REQUEST);}OrderInfoVo orderInfoVo = new OrderInfoVo();orderInfoVo.setOrderId(orderId);BeanUtils.copyProperties(orderInfo,orderInfoVo);return orderInfoVo;
}// 司机端web接口
@Operation(summary = "获取订单账单详细信息")
@GuiguLogin
@GetMapping("/getOrderInfo/{orderId}")
public Result<OrderInfoVo> getOrderInfo(@PathVariable Long orderId) {Long driverId = AuthContextHolder.getUserId();return Result.ok(orderService.getOrderInfo(orderId, driverId));
}@Override
public OrderInfoVo getOrderInfo(Long orderId, Long driverId) {OrderInfo orderInfo = orderInfoFeignClient.getOrderInfo(orderId).getData();if(orderInfo.getDriverId() != driverId) {throw new GuiguException(ResultCodeEnum.ILLEGAL_REQUEST);}OrderInfoVo orderInfoVo = new OrderInfoVo();orderInfoVo.setOrderId(orderId);BeanUtils.copyProperties(orderInfo,orderInfoVo);return orderInfoVo;
}

司乘同显

在这里插入图片描述

  • 司机抢单成功后要赶往上车点,我们要计算司机赶往上车点的最佳线路,司机端与乘客端都要显示司机乘同显,这样乘客就能实时看见司机的动向。

司机端司乘同显

  • 司机所在地址司乘同显开始位置,代驾地址就是司乘同显终点
  • 计算司机司乘同显最佳路线
@Operation(summary = "计算最佳驾驶线路")
@GuiguLogin
@PostMapping("/calculateDrivingLine")
public Result<DrivingLineVo> calculateDrivingLine(@RequestBody CalculateDrivingLineForm calculateDrivingLineForm) {return Result.ok(orderService.calculateDrivingLine(calculateDrivingLineForm));
}//计算最佳驾驶线路
@Override
public DrivingLineVo calculateDrivingLine(CalculateDrivingLineForm calculateDrivingLineForm) {return mapFeignClient.calculateDrivingLine(calculateDrivingLineForm).getData();
}

更新位置到Redis里面

  • 司机要赶往代驾地址,实时更新司机当前最新位置(经纬度)到Redis里面
  • 乘客看到司机的动向,司机端更新,乘客端获取
@Operation(summary = "司机赶往代驾起始点:更新订单地址到缓存")
@PostMapping("/updateOrderLocationToCache")
public Result<Boolean> updateOrderLocationToCache(@RequestBody UpdateOrderLocationForm updateOrderLocationForm) {return Result.ok(locationService.updateOrderLocationToCache(updateOrderLocationForm));
}//司机赶往代驾起始点:更新订单地址到缓存
@Override
public Boolean updateOrderLocationToCache(UpdateOrderLocationForm updateOrderLocationForm) {OrderLocationVo orderLocationVo = new OrderLocationVo();orderLocationVo.setLongitude(updateOrderLocationForm.getLongitude());orderLocationVo.setLatitude(updateOrderLocationForm.getLatitude());String key = RedisConstant.UPDATE_ORDER_LOCATION + updateOrderLocationForm.getOrderId();redisTemplate.opsForValue().set(key,orderLocationVo);return true;
}/*** 司机赶往代驾起始点:更新订单地址到缓存* @param updateOrderLocationForm* @return*/
@PostMapping("/map/location/updateOrderLocationToCache")
Result<Boolean> updateOrderLocationToCache(@RequestBody UpdateOrderLocationForm updateOrderLocationForm);@Operation(summary = "司机赶往代驾起始点:更新订单位置到Redis缓存")
@GuiguLogin
@PostMapping("/updateOrderLocationToCache")
public Result updateOrderLocationToCache(@RequestBody UpdateOrderLocationForm updateOrderLocationForm) {return Result.ok(locationService.updateOrderLocationToCache(updateOrderLocationForm));
}@Override
public Boolean updateOrderLocationToCache(UpdateOrderLocationForm updateOrderLocationForm) {return locationFeignClient.updateOrderLocationToCache(updateOrderLocationForm).getData();
}

获取司机基本信息

  • 乘客进入司乘同显页面,需要加载司机基本信息,司机姓名,头像等信息
@Operation(summary = "获取司机基本信息")
@GetMapping("/getDriverInfo/{driverId}")
public Result<DriverInfoVo> getDriverInfoOrder(@PathVariable Long driverId) {return Result.ok(driverInfoService.getDriverInfoOrder(driverId));
}//获取司机基本信息
@Override
public DriverInfoVo getDriverInfoOrder(Long driverId) {//司机id获取基本信息DriverInfo driverInfo = driverInfoMapper.selectById(driverId);//封装DriverInfoVoDriverInfoVo driverInfoVo = new DriverInfoVo();BeanUtils.copyProperties(driverInfo,driverInfoVo);//计算驾龄//获取当前年int currentYear = new DateTime().getYear();//获取驾驶证初次领证日期//driver_license_issue_dateint firstYear = new DateTime(driverInfo.getDriverLicenseIssueDate()).getYear();int driverLicenseAge = currentYear - firstYear;driverInfoVo.setDriverLicenseAge(driverLicenseAge);return driverInfoVo;
}/*** 获取司机基本信息* @param driverId* @return*/
@GetMapping("/driver/info/getDriverInfo/{driverId}")
Result<DriverInfoVo> getDriverInfo(@PathVariable("driverId") Long driverId);@Operation(summary = "根据订单id获取司机基本信息")
@GuiguLogin
@GetMapping("/getDriverInfo/{orderId}")
public Result<DriverInfoVo> getDriverInfo(@PathVariable Long orderId) {Long customerId = AuthContextHolder.getUserId();return Result.ok(orderService.getDriverInfo(orderId, customerId));
}@Override
public DriverInfoVo getDriverInfo(Long orderId, Long customerId) {//根据订单id获取订单信息OrderInfo orderInfo = orderInfoFeignClient.getOrderInfo(orderId).getData();if(orderInfo.getCustomerId() != customerId) {throw new GuiguException(ResultCodeEnum.DATA_ERROR);}return driverInfoFeignClient.getDriverInfo(orderInfo.getDriverId()).getData();
}

乘客端获取司机经纬度位置

@Operation(summary = "司机赶往代驾起始点:获取订单经纬度位置")
@GetMapping("/getCacheOrderLocation/{orderId}")
public Result<OrderLocationVo> getCacheOrderLocation(@PathVariable Long orderId) {return Result.ok(locationService.getCacheOrderLocation(orderId));
}@Override
public OrderLocationVo getCacheOrderLocation(Long orderId) {String key = RedisConstant.UPDATE_ORDER_LOCATION + orderId;OrderLocationVo orderLocationVo = (OrderLocationVo)redisTemplate.opsForValue().get(key);return orderLocationVo;
}/*** 司机赶往代驾起始点:获取订单经纬度位置* @param orderId* @return*/
@GetMapping("/map/location/getCacheOrderLocation/{orderId}")
Result<OrderLocationVo> getCacheOrderLocation(@PathVariable("orderId") Long orderId);@Operation(summary = "司机赶往代驾起始点:获取订单经纬度位置")
@GetMapping("/getCacheOrderLocation/{orderId}")
public Result<OrderLocationVo> getCacheOrderLocation(@PathVariable Long orderId) {return Result.ok(locationService.getCacheOrderLocation(orderId));
}@Override
public OrderLocationVo getCacheOrderLocation(Long orderId) {return locationFeignClient.getCacheOrderLocation(orderId).getData();
}@Operation(summary = "计算最佳驾驶线路")
@GuiguLogin
@PostMapping("/calculateDrivingLine")
public Result<DrivingLineVo> calculateDrivingLine(@RequestBody CalculateDrivingLineForm calculateDrivingLineForm) {return Result.ok(orderService.calculateDrivingLine(calculateDrivingLineForm));
}@Override
public DrivingLineVo calculateDrivingLine(CalculateDrivingLineForm calculateDrivingLineForm) {return mapFeignClient.calculateDrivingLine(calculateDrivingLineForm).getData();
}

司机到达起始点

在这里插入图片描述

  • 司机到达代驾起始点之后,更新当前代驾订单数据
  • 更新订单状态:司机到达
  • 更新订单到达时间
@Operation(summary = "司机到达起始点")
@GetMapping("/driverArriveStartLocation/{orderId}/{driverId}")
public Result<Boolean> driverArriveStartLocation(@PathVariable Long orderId, @PathVariable Long driverId) {return Result.ok(orderInfoService.driverArriveStartLocation(orderId, driverId));
}//司机到达起始点
@Override
public Boolean driverArriveStartLocation(Long orderId, Long driverId) {// 更新订单状态和到达时间,条件:orderId + driverIdLambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();wrapper.eq(OrderInfo::getId,orderId);wrapper.eq(OrderInfo::getDriverId,driverId);OrderInfo orderInfo = new OrderInfo();orderInfo.setStatus(OrderStatus.DRIVER_ARRIVED.getStatus());orderInfo.setArriveTime(new Date());int rows = orderInfoMapper.update(orderInfo, wrapper);if(rows == 1) {return true;} else {throw new GuiguException(ResultCodeEnum.UPDATE_ERROR);}
}/*** 司机到达起始点* @param orderId* @param driverId* @return*/
@GetMapping("/order/info/driverArriveStartLocation/{orderId}/{driverId}")
Result<Boolean> driverArriveStartLocation(@PathVariable("orderId") Long orderId, @PathVariable("driverId") Long driverId);@Operation(summary = "司机到达代驾起始地点")
@GuiguLogin
@GetMapping("/driverArriveStartLocation/{orderId}")
public Result<Boolean> driverArriveStartLocation(@PathVariable Long orderId) {Long driverId = AuthContextHolder.getUserId();return Result.ok(orderService.driverArriveStartLocation(orderId, driverId));
}//司机到达代驾起始地点
@Override
public Boolean driverArriveStartLocation(Long orderId, Long driverId) {return orderInfoFeignClient.driverArriveStartLocation(orderId,driverId).getData();
}

司机更新代驾车辆信息

司机到达代驾起始点,联系了乘客,见到了代驾车辆,要拍照与录入车辆信息

在这里插入图片描述

@Operation(summary = "更新代驾车辆信息")
@PostMapping("/updateOrderCart")
public Result<Boolean> updateOrderCart(@RequestBody UpdateOrderCartForm updateOrderCartForm) {return Result.ok(orderInfoService.updateOrderCart(updateOrderCartForm));
}Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm);@Transactional(rollbackFor = Exception.class)
@Override
public Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm) {LambdaQueryWrapper<OrderInfo> queryWrapper = new LambdaQueryWrapper<>();queryWrapper.eq(OrderInfo::getId, updateOrderCartForm.getOrderId());queryWrapper.eq(OrderInfo::getDriverId, updateOrderCartForm.getDriverId());OrderInfo updateOrderInfo = new OrderInfo();BeanUtils.copyProperties(updateOrderCartForm, updateOrderInfo);updateOrderInfo.setStatus(OrderStatus.UPDATE_CART_INFO.getStatus());//只能更新自己的订单int row = orderInfoMapper.update(updateOrderInfo, queryWrapper);if(row == 1) {//记录日志this.log(updateOrderCartForm.getOrderId(), OrderStatus.UPDATE_CART_INFO.getStatus());} else {throw new GuiguException(ResultCodeEnum.UPDATE_ERROR);}return true;
}/*** 更新代驾车辆信息* @param updateOrderCartForm* @return*/
@PostMapping("/order/info//updateOrderCart")
Result<Boolean> updateOrderCart(@RequestBody UpdateOrderCartForm updateOrderCartForm);@Operation(summary = "更新代驾车辆信息")
@GuiguLogin
@PostMapping("/updateOrderCart")
public Result<Boolean> updateOrderCart(@RequestBody UpdateOrderCartForm updateOrderCartForm) {Long driverId = AuthContextHolder.getUserId();updateOrderCartForm.setDriverId(driverId);return Result.ok(orderService.updateOrderCart(updateOrderCartForm));
}@Override
public Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm) {return orderInfoFeignClient.updateOrderCart(updateOrderCartForm).getData();
}

公司只有一个总的理想,员工不能要求公司去实现你的理想,你必须适应这个总的理想,参加主力部队作战,发挥你的作用。我们的主航道不会变化,你们与大学合作的面宽一点,到2012实验室的时候窄一点,到产品研发更是窄窄的,要有长期性的清晰指标。

https://baijiahao.baidu.com/s?id=1760664270073856317&wfr=spider&for=pc
擦亮花火、共创未来——任正非在“难题揭榜”花火奖座谈会上的讲话
任正非

相关文章:

乐尚代驾六订单执行一

加载当前订单 需求 无论是司机端&#xff0c;还是乘客端&#xff0c;遇到页面切换&#xff0c;重新登录小程序等&#xff0c;只要回到首页面&#xff0c;查看当前是否有正在执行订单&#xff0c;如果有跳转到当前订单执行页面 之前这个接口已经开发&#xff0c;为了测试&…...

SciPy 与 MATLAB 数组

SciPy 与 MATLAB 数组 SciPy 是一个开源的 Python 库,广泛用于科学和工程计算。它构建在 NumPy 数组的基础之上,提供了许多高级科学计算功能。MATLAB 是一个高性能的数值计算环境,它也使用数组作为其基础数据结构。在这篇文章中,我们将探讨 SciPy 和 MATLAB 在数组操作上的…...

基于vue-grid-layout插件(vue版本)实现增删改查/拖拽自动排序等功能(已验证、可正常运行)

前端时间有个需求&#xff0c;需要对33&#xff08;不一定&#xff0c;也可能多行&#xff09;的卡片布局&#xff0c;进行拖拽&#xff0c;拖拽过程中自动排序&#xff0c;以下代码是基于vue2&#xff0c;可直接运行&#xff0c;报错可评论滴我 部分代码优化来自于GPT4o和Clau…...

DBoW3相关优化脉络

1 DBow3 GitHub - rmsalinas/DBow3: Improved version of DBow2 2 优化后得到fbow GitHub - rmsalinas/fbow: FBOW (Fast Bag of Words) is an extremmely optimized version of the DBow2/DBow3 libraries. 其中fbow是ucoslam的一部分&#xff1b; ucoslam GitHub - la…...

qt 如何制作动态库插件

首先 首先第一点要确定我们的接口是固定的&#xff0c;也就是要确定 #ifndef RTSPPLUGIN_H #define RTSPPLUGIN_H #include "rtspplugin_global.h" typedef void (*func_callback)(uint8_t* data,int len,uint32_t ssrc,uint32_t ts,const char* ipfrom,uint16_t f…...

一种docker start放回Error response from daemon: task xxx错误的解决方式

1. 问题描述 执行systemctl daemon-reload与systemctl restart docker命令后&#xff0c;发现docker中有的应用无法启动&#xff0c;并显示出Exit(255)的错误提示。 重新执行docker start 容器id后发现返回&#xff0c;Error response from daemon: task xxx的错误。 2. 问题…...

规控面试常见问题

一、项目中遇到的困难或者挑战是什么? 二、A*算法原理(伪代码) 输入:代价地图、start 、 goal(Node结构,包含x、y、g、h、id、pid信息) 首先初始化:创建一个优先级队列openlist,它是一个最小堆,根据节点的f值排序 ( priority_queue<Node, std::vector<Node…...

代码随想录算法训练营Day 63| 图论 part03 | 417.太平洋大西洋水流问题、827.最大人工岛、127. 单词接龙

代码随想录算法训练营Day 63| 图论 part03 | 417.太平洋大西洋水流问题、827.最大人工岛、127. 单词接龙 文章目录 代码随想录算法训练营Day 63| 图论 part03 | 417.太平洋大西洋水流问题、827.最大人工岛、127. 单词接龙17.太平洋大西洋水流问题一、DFS二、BFS三、本题总结 82…...

【全网最全】CSDN博客的文字颜色、字体和字号设置

文章目录 一、字体颜色二、字体大小三、字体类型四、字体背景色 在这篇博客中&#xff0c;我们将深入探讨如何在Markdown编辑器中设置文字颜色、大小、字体与背景色。Markdown本身并不直接支持这些功能&#xff0c;但通过结合HTML标签和CSS样式&#xff0c;我们可以实现这些视觉…...

C#实现数据采集系统-Mqtt实现采集数据转发

在数据采集系统中,通过ModbusTcp采集到数据之后,再通过MQTT转发到其他应用 MQTT操作 安装MQTT mqtt介绍和环境安装 使用MQTT 在C#/Net中使用Mqtt MQTT类封装 MQTT配置类 public class MqttConfig{public string Ip {get; set;...

common-intellisense:助力TinyVue 组件书写体验更丝滑

本文由体验技术团队Kagol原创~ 前两天&#xff0c;common-intellisense 开源项目的作者 Simon-He95 在 VueConf 2024 群里发了一个重磅消息&#xff1a; common-intellisense 支持 TinyVue 组件库啦&#xff01; common-intellisense 插件能够提供超级强大的智能提示功能&…...

图片在线压缩有效方法详解,分享7款最佳图片压缩工具免费(全新)

当您的系统中图片数量不断增加&#xff0c;却无法删除时&#xff0c;那么就需要通过图片压缩来解决您的问题。随着图片文件的增大&#xff0c;高分辨率图片占据了大量存储空间。而此时系统中的存储空间也开始变得不够用&#xff0c;无法跟上高质量图片的增长。因此&#xff0c;…...

electron安装及快速创建

electron安装及快速创建 electron是一个使用 JavaScript、HTML 和 CSS 构建桌面应用程序的框架。 详细内容见官网&#xff1a;https://www.electronjs.org/zh/docs/latest/。 今天来记录下练习中的安装过程和hello world的创建。 创建项目文件夹&#xff0c;并执行npm 初始化命…...

需要消化的知识点

需要消化 消灭清单 如何自定义一个Interceptor拦截器&#xff1f; 后端开发可以用上的前端技巧 10个堪称神器的 Java 学习网站. 【前端胖头鱼】11 chrome高级调试技巧&#xff0c;学会效率直接提升666% 【前端胖头鱼】10个我经常逛的“小网站” 【前端劝退师lv-6】Chrome D…...

2024年7月25日(Git gitlab以及分支管理 )

分布式版本控制系统 一、Git概述 Git 是一种分布式版本控制系统,用于跟踪和管理代码的变更。它是由Linus Torvalds创建的,最 初被设计用于Linux内核的开发。Git允许开发人员跟踪和管理代码的版本,并且可以在不同的开 发人员之间进行协作。 Github 用的就是Git系统来管理它们的…...

pdf格式过大怎么样变小 pdf文件过大如何缩小上传 超实用的简单方法

面对体积庞大的 PDF 文件&#xff0c;我们常常需要寻找有效的方法来缩减其大小。这不仅能够优化存储空间&#xff0c;还能提升文件的传输和打开速度。PDF文件以其稳定性和跨平台兼容性成为工作和学习中的重要文件格式。然而&#xff0c;当我们需要通过邮件发送或上传大文件时&a…...

前端文件下载word乱码问题

记录一次word下载乱码问题&#xff1a; 用的请求是axios库&#xff0c;然后用Blob去接收二进制文件 思路&#xff1a;现在的解决办法有以下几种&#xff0c;看看是对应哪种&#xff0c;可以尝试解决 1.将响应类型设为blob&#xff0c;这也是最重要的&#xff0c;如果没有解决…...

repo中的default.xml文件project name为什么一样?

文章目录 default.xml文件介绍为什么 name 是一样的&#xff0c;path 不一样&#xff1f;总结 default.xml文件介绍 在 repo 工具的 default.xml 文件中&#xff0c;定义了多个 project 元素&#xff0c;每个元素都代表一个 Git 仓库。 XML 定义了多个不同的 project 元素&…...

<section id=“nice“ data-tool=“mdnice编辑器“ data-webs

大模型日报 2024-07-24 大模型资讯 Meta发布最大Llama 3 AI模型&#xff0c;语言和数学能力提升 摘要: Meta公司发布了其迄今为止最大的Llama 3人工智能模型。该模型主要免费提供&#xff0c;具备多语言处理能力&#xff0c;并在语言和数学方面表现出显著提升。 Meta发布最强AI…...

作业7.26~28

全双工&#xff1a; 通信双方 既可以发送&#xff0c;也可以接收数据 1. 利用多线程 或者 多进程&#xff0c; 实现TCP服务器 和 客户端的全双工通信 思路&#xff1a; 服务器和客户端&#xff0c; 在建立通信以后&#xff0c;可以创建线程&#xff0c;在线程编写另一个功能代…...

Chapter03-Authentication vulnerabilities

文章目录 1. 身份验证简介1.1 What is authentication1.2 difference between authentication and authorization1.3 身份验证机制失效的原因1.4 身份验证机制失效的影响 2. 基于登录功能的漏洞2.1 密码爆破2.2 用户名枚举2.3 有缺陷的暴力破解防护2.3.1 如果用户登录尝试失败次…...

Spark 之 入门讲解详细版(1)

1、简介 1.1 Spark简介 Spark是加州大学伯克利分校AMP实验室&#xff08;Algorithms, Machines, and People Lab&#xff09;开发通用内存并行计算框架。Spark在2013年6月进入Apache成为孵化项目&#xff0c;8个月后成为Apache顶级项目&#xff0c;速度之快足见过人之处&…...

Python爬虫(二):爬虫完整流程

爬虫完整流程详解&#xff08;7大核心步骤实战技巧&#xff09; 一、爬虫完整工作流程 以下是爬虫开发的完整流程&#xff0c;我将结合具体技术点和实战经验展开说明&#xff1a; 1. 目标分析与前期准备 网站技术分析&#xff1a; 使用浏览器开发者工具&#xff08;F12&…...

相机从app启动流程

一、流程框架图 二、具体流程分析 1、得到cameralist和对应的静态信息 目录如下: 重点代码分析: 启动相机前,先要通过getCameraIdList获取camera的个数以及id,然后可以通过getCameraCharacteristics获取对应id camera的capabilities(静态信息)进行一些openCamera前的…...

Module Federation 和 Native Federation 的比较

前言 Module Federation 是 Webpack 5 引入的微前端架构方案&#xff0c;允许不同独立构建的应用在运行时动态共享模块。 Native Federation 是 Angular 官方基于 Module Federation 理念实现的专为 Angular 优化的微前端方案。 概念解析 Module Federation (模块联邦) Modul…...

Python如何给视频添加音频和字幕

在Python中&#xff0c;给视频添加音频和字幕可以使用电影文件处理库MoviePy和字幕处理库Subtitles。下面将详细介绍如何使用这些库来实现视频的音频和字幕添加&#xff0c;包括必要的代码示例和详细解释。 环境准备 在开始之前&#xff0c;需要安装以下Python库&#xff1a;…...

实现弹窗随键盘上移居中

实现弹窗随键盘上移的核心思路 在Android中&#xff0c;可以通过监听键盘的显示和隐藏事件&#xff0c;动态调整弹窗的位置。关键点在于获取键盘高度&#xff0c;并计算剩余屏幕空间以重新定位弹窗。 // 在Activity或Fragment中设置键盘监听 val rootView findViewById<V…...

Android 之 kotlin 语言学习笔记三(Kotlin-Java 互操作)

参考官方文档&#xff1a;https://developer.android.google.cn/kotlin/interop?hlzh-cn 一、Java&#xff08;供 Kotlin 使用&#xff09; 1、不得使用硬关键字 不要使用 Kotlin 的任何硬关键字作为方法的名称 或字段。允许使用 Kotlin 的软关键字、修饰符关键字和特殊标识…...

C# 求圆面积的程序(Program to find area of a circle)

给定半径r&#xff0c;求圆的面积。圆的面积应精确到小数点后5位。 例子&#xff1a; 输入&#xff1a;r 5 输出&#xff1a;78.53982 解释&#xff1a;由于面积 PI * r * r 3.14159265358979323846 * 5 * 5 78.53982&#xff0c;因为我们只保留小数点后 5 位数字。 输…...

IP如何挑?2025年海外专线IP如何购买?

你花了时间和预算买了IP&#xff0c;结果IP质量不佳&#xff0c;项目效率低下不说&#xff0c;还可能带来莫名的网络问题&#xff0c;是不是太闹心了&#xff1f;尤其是在面对海外专线IP时&#xff0c;到底怎么才能买到适合自己的呢&#xff1f;所以&#xff0c;挑IP绝对是个技…...