零基础开始学习鸿蒙开发-智能家居APP离线版介绍

目录

1.我的小屋

2.查找设备

3.个人主页


前言

        好久不发博文了,最近都忙于面试,忙于找工作,这段时间终于找到工作了。我对鸿蒙开发的激情依然没有减退,前几天做了一个鸿蒙的APP,现在给大家分享一下!

      具体功能如下图:

1.我的小屋

        1.1 锁门:对大门开关锁的控制

        1.2设备状态:展示了某台设备的详细信息

        1.3 控制面板:房门开关、车库门开关、窗帘开关、灯开关

        1.4 添加设备:根据设备信息添加设备

我的小屋

锁门

设备状态

2.查找设备

        2.1 搜索:对已经添加的设备进行搜索

        2.2 搜索历史:可以查看到搜索过的信息

查找设备

3.个人主页

    3.1 个人资料:展示个人的资料信息,支持修改

    3.2账号与安全:包含修改密码和退出登录

注册页面代码

// 导入必要的模块
import router from '@ohos.router';
import Preferences from '@ohos.data.preferences';
import UserBean from '../common/bean/UserBean';// 注册页面
@Entry
@Component
struct RegisterPage {@State username: string = '';@State password: string = '';@State confirmPwd: string = '';@State errorMsg: string = '';private prefKey: string = 'userData'private context = getContext(this)// 保存用户数据(保持原逻辑)async saveUser() {try {let prefs = await Preferences.getPreferences(this.context, this.prefKey)const newUser: UserBean = {// @ts-ignoreusername: this.username,password: this.password}await prefs.put(this.username, JSON.stringify(newUser))await prefs.flush()router.back()} catch (e) {console.error('注册失败:', e)}}// 注册验证(保持原逻辑)handleRegister() {if (!this.username || !this.password) {this.errorMsg = '用户名和密码不能为空'return}if (this.password !== this.confirmPwd) {this.errorMsg = '两次密码不一致'return}this.saveUser()}build() {Column() {// 用户名输入框TextInput({ placeholder: '用户名' }).width('80%').height(50).margin({ bottom: 20 }).backgroundColor('#FFFFFF')  // 新增白色背景.onChange(v => this.username = v)// 密码输入框// @ts-ignoreTextInput({ placeholder: '密码', type: InputType.Password }).width('80%').height(50).margin({ bottom: 20 }).backgroundColor('#FFFFFF')  // 新增白色背景.onChange(v => this.password = v)// 确认密码输入框// @ts-ignoreTextInput({ placeholder: '确认密码', type: InputType.Password }).width('80%').height(50).margin({ bottom: 20 }).backgroundColor('#FFFFFF')  // 新增白色背景.onChange(v => this.confirmPwd = v)// 错误提示(保持原样)if (this.errorMsg) {Text(this.errorMsg).fontColor('red').margin({ bottom: 10 })}// 注册按钮(保持原样)Button('注册', { type: ButtonType.Capsule }).width('80%').height(50).backgroundColor('#007AFF').onClick(() => this.handleRegister())// 返回按钮(保持原样)Button('返回登录', { type: ButtonType.Capsule }).width('80%').height(40).margin({ top: 20 }).backgroundColor('#34C759').onClick(() => router.back())}.width('100%').height('100%').padding(20).justifyContent(FlexAlign.Center).backgroundColor('#1A1A1A')  // 新增暗黑背景色}
}

登录页面代码

// 导入必要的模块
import router from '@ohos.router';
import Preferences from '@ohos.data.preferences';
import DeviceBean from '../common/bean/DeviceBean';// 用户数据模型
class User {username: string = '';password: string = '';
}// 登录页面
@Entry
@Component
struct LoginPage {@State username: string = '';@State password: string = '';@State errorMsg: string = '';@State deviceList:Array<DeviceBean> =[new DeviceBean(0,'设备1',0,0,0,0,0,0,0,0,0,0,),new DeviceBean(1,'设备2',0,0,0,0,0,0,0,0,0,0,),new DeviceBean(3,'设备3',0,0,0,0,0,0,0,0,0,0,)];private prefKey: string = 'userData'// 获取本地存储上下文private context = getContext(this)// 获取用户数据async getUser(): Promise<User | null> {try {// @ts-ignorereturn userData ? JSON.parse(userData) : null} catch (e) {console.error('读取失败:', e)return null}}// 登录处理async handleLogin(username:string,password:string,) {if (!this.username || !this.password) {this.errorMsg = '用户名和密码不能为空'return}const user = await this.getUser()if ( username == 'admin' && password=='123456') {AppStorage.SetOrCreate("deviceList",this.deviceList);AppStorage.SetOrCreate("signature","金克斯的含义就是金克斯")AppStorage.SetOrCreate("nickName","金克斯")AppStorage.SetOrCreate("nickname","金克斯")AppStorage.SetOrCreate("login_username",this.username)// 登录成功跳转主页router.pushUrl({ url: 'pages/MainPages', params: { username: this.username } })} else {this.errorMsg = '用户名或密码错误'}}build() {Column() {// 新增欢迎语Text('欢迎登录智能家庭app').fontSize(24).margin({ bottom: 40 }).fontColor('#FFFFFF') // 白色文字TextInput({ placeholder: '用户名' }).width('80%').height(50).margin({ bottom: 20 }).onChange(v => this.username = v).fontColor(Color.White).placeholderColor(Color.White)// @ts-ignoreTextInput({ placeholder: '密码', type: InputType.Password}).fontColor(Color.White).placeholderColor(Color.White).width('80%').height(50).margin({ bottom: 20 }).onChange(v => this.password = v)if (this.errorMsg) {Text(this.errorMsg).fontColor('red').margin({ bottom: 10 })}Button('登录', { type: ButtonType.Capsule }).width('80%').height(50).backgroundColor('#007AFF').onClick(() => this.handleLogin(this.username,this.password))Button('注册', { type: ButtonType.Capsule }).width('80%').height(40).margin({ top: 20 }).backgroundColor('#34C759').onClick(() => router.pushUrl({ url: 'pages/RegisterPage' }))}.width('100%').height('100%').padding(20).justifyContent(FlexAlign.Center).backgroundColor('#1A1A1A') // 新增暗黑背景色}
}

主页代码

import prompt from '@ohos.prompt';
import { TabID, TabItemList } from '../model/TabItem'
import { DeviceSearchComponent } from '../view/DeviceSearchComponent';
import HouseStateComponent from '../view/HouseStateComponent';
import { MineComponent } from '../view/MineComponent';
import { NotLogin } from '../view/NotLogin';
@Entry
@Component
struct MainPages {@State pageIndex:number = 0;//页面索引private tabController:TabsController = new TabsController();//tab切换控制器@Builder MyTabBuilder(idx:number){Column(){Image(idx === this.pageIndex ? TabItemList[idx].icon_selected:TabItemList[idx].icon).width(32).height(32)// .margin({top:5})Text(TabItemList[idx].title).fontSize(14).fontWeight(FontWeight.Bold).fontColor(this.pageIndex === idx ? '#006eee':'#888')}}build() {Tabs({barPosition:BarPosition.End}){TabContent(){// Text('小屋状态')HouseStateComponent()}// .tabBar('小屋状态').tabBar(this.MyTabBuilder(TabID.HOUSE)) //调用自定义的TabBarTabContent(){// Text('搜索设备')DeviceSearchComponent()//调用设备搜索组件}// .tabBar('搜索设备').tabBar(this.MyTabBuilder(TabID.SEARCH_DEVICE)) //调用自定义的TabBarTabContent(){// Text('我的')MineComponent();//个人主页// NotLogin()}// .tabBar('我的').tabBar(this.MyTabBuilder(TabID.MINE)) //调用自定义的TabBar}.barWidth('100%').barMode(BarMode.Fixed).width('100%').height('100%').onChange((index)=>{//绑定onChange函数切换页签this.pageIndex = index;}).backgroundColor('#000')}
}

我的小屋代码

import router from '@ohos.router';
import { Action } from '@ohos.multimodalInput.keyEvent';
import DeviceBean from '../common/bean/DeviceBean';
import MainViewModel from '../model/MainViewModel';
import promptAction from '@ohos.promptAction';// 自定义弹窗组件
@CustomDialog
struct SimpleDialog {@State deviceList:Array<DeviceBean> =[new DeviceBean(0,'设备1',0,0,0,0,0,0,0,0,0,0,),new DeviceBean(1,'设备2',0,0,0,0,0,0,0,0,0,0,),new DeviceBean(3,'设备3',0,0,0,0,0,0,0,0,0,0,)];// @ts-ignore@State deviceId: number=1; //设备ID@State name: string=''; //设备名@State temperator: number=25.3; //室内温度@State humidity: number =20; //室内湿度@State lumination: number =10; //光照@State isRain: number =30; //下雨预警 0:正常 1:触发报警@State isSmoke: number =0; //烟雾报警 0:正常 1:触发报警@State isFire: number=0; //火灾报警 0:正常 1:触发报警@State doorStatus: number=0; //门开关状态 0:正常 1:开启@State garageStatus: number=0; //车库门开关 0:正常 1:开启@State curtainStatus: number=0; //窗帘开关 0:正常 1:开启@State lightStatus: number=0; //灯开关 0:正常 1:开启@State  tempDevice: DeviceBean =  new DeviceBean(0,'',0,0,0,0,0,0,0,0,0,0,);tmpMap:Map<string, string> = new Map();controller:CustomDialogController;build() {Column() {// 设备基本信息TextInput({ placeholder: '设备ID(数字)' }).onChange(v => this.tempDevice.deviceId = Number(v))TextInput({ placeholder: '设备名称' }).onChange(v => this.tempDevice.name = v)// 环境参数/*  TextInput({ placeholder: '温度(0-100)' }).onChange(v => this.tempDevice.temperator = Number(v))TextInput({ placeholder: '湿度(0-100)' }).onChange(v => this.tempDevice.humidity = Number(v))TextInput({ placeholder: '光照强度' }).onChange(v => this.tempDevice.lumination = Number(v))*/Button('保存').onClick(()=>{promptAction.showToast({message:'保存成功!',duration:2000,})// 添加新设备到列表//this.deviceList = [...this.deviceList, {...this.tempDevice}];console.log(JSON.stringify(this.tempDevice))this.deviceList.push(this.tempDevice); // 关键步骤:创建新数组AppStorage.SetOrCreate("deviceList",this.deviceList);this.controller.close()})/*   .onClick(() => {this.deviceList = [...this.deviceList, {// @ts-ignoreid: this.id,name: this.name,}]this.controller.close()})*/}.padding(20)}
}@Component
export default struct HouseStateComponent{private exitDialog() {  }@State handlePopup: boolean = false@State devices: DeviceBean[]=[]// 确保控制器正确初始化private dialogController: CustomDialogController = new CustomDialogController({builder: SimpleDialog(),  // 确认组件正确引用cancel: this.exitDialog,  // 关闭回调autoCancel: true          // 允许点击外部关闭})@Builder AddMenu(){Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {Column(){Text('扫一扫').fontSize(20).width('100%').height(30).align(Alignment.Center)Divider().width('80%').color('#ccc')Text('添加设备').fontSize(20).width('100%').height(30).align(Alignment.Center).onClick(()=>{this.dialogController.open()})}.padding(5).height(65)}.width(100)}build(){Column({space:8}){Row() {Text('小屋状态').fontSize(24).fontWeight(FontWeight.Bold).fontColor(Color.White).margin({ top: 10 }).textAlign(TextAlign.Start)Image($r('app.media.jiahao_0')).width(32).height(32).margin({top:10,left:160}).bindMenu(this.AddMenu())Image($r('app.media.news')).fillColor(Color.Black).width(32).height(32).margin({top:10}).onClick(() => {this.handlePopup = !this.handlePopup}).bindPopup(this.handlePopup,{message:'当前暂无未读消息',})// .onClick({//// })}.width('95%').justifyContent(FlexAlign.SpaceBetween)Divider().width('95%').color(Color.White)Flex({ wrap: FlexWrap.Wrap }){Button()Row() {Shape() {Circle({ width: 60, height: 60 }).fill('#494848').margin({left:15,top:'32%'}).opacity(0.7)Image($r('app.media.lock')).width(30).margin({ left: 30 ,top:'42%'})}.height('100%')Column() {Text('大门').fontSize(25).fontColor('#838383').fontWeight(FontWeight.Bold).margin({ left: 20, top: 0 })Text('已锁').fontSize(25).fontColor('#838383').fontWeight(FontWeight.Bold).margin({ left: 20, top: 0 })}}.borderRadius(20).backgroundColor('#1c1c1e')// .backgroundImage($r('app.media.Button_img'))// .backgroundImageSize(ImageSize.Cover)// .border({ width: 1 })// .borderColor('#b9b9b9').width('47%').height(160).onClick(()=>{router.pushUrl({url:"house/HomeGate"})})Button()Row() {Shape() {Circle({ width: 60, height: 60 }).fill('#494848').margin({left:15,top:'32%'}).opacity(0.7)Image($r('app.media.Device_icon')).width(30).margin({ left: 30 ,top:'42%'})}.height('100%')Column() {Text('设备').fontSize(25).fontColor('#838383').fontWeight(FontWeight.Bold).margin({ left: 20, top: 0 })Text('状态').fontSize(25).fontColor('#838383').fontWeight(FontWeight.Bold).margin({ left: 20, top: 0 })}}.onClick(()=>{router.pushUrl({url:"house/DeviceStatus"})}).borderRadius(20).backgroundColor('#1c1c1e').margin({left:20})// .border({ width: 1 })// .borderColor('#b9b9b9').width('47%').height(160)}.width('95%').padding(10)Flex() {Button()Row() {Shape() {Circle({ width: 60, height: 60 }).fill('#494848').margin({ left: 15, top: '32%' }).opacity(0.7)Image($r('app.media.console_1')).width(30).margin({ left: 30, top: '47%' })}.height('100%')Column() {Text('控制').fontSize(25).fontColor('#838383').fontWeight(FontWeight.Bold).margin({ left: 20, top: 0 })Text('面板').fontSize(25).fontColor('#838383').fontWeight(FontWeight.Bold).margin({ left: 20, top: 0 })}}.onClick(() => {router.pushUrl({url: "house/ControlConsole"})}).borderRadius(20).backgroundColor('#1c1c1e')// .border({ width: 1 })// .borderColor('#b9b9b9').width('47%').height(160)}.width('95%').padding(10)}.width('100%').height('100%').backgroundImage($r('app.media.index_background1')).backgroundImageSize(ImageSize.Cover)}
}

设备搜索代码

import DeviceBean from '../common/bean/DeviceBean'
@Component
export struct DeviceSearchComponent {@State submitValue: string = '' //获取历史记录数据@State allDevices:Array<DeviceBean> =[new DeviceBean(0,'设备1',0,0,0,0,0,0,0,0,0,0,),new DeviceBean(1,'设备2',0,0,0,0,0,0,0,0,0,0,)];@State all_devices:Array<DeviceBean> =AppStorage.Get("deviceList");@State filteredDevices:Array<DeviceBean>=[];controller: SearchController = new SearchController()scroll: Scroller = new Scroller()@State historyValueArr: Array<string> = [] //历史记录存放private swiperController: SwiperController = new SwiperController()build() {Column({ space: 8 }) {Row({space:1}){Search({placeholder:'搜索一下',controller: this.controller}).searchButton('搜索').margin(15).width('80%').height(40).backgroundColor('#F5F5F5').placeholderColor(Color.Grey).placeholderFont({ size: 14, weight: 400 }).textFont({ size: 14, weight: 400 }).onSubmit((value: string) => { //绑定 输入内容添加到submit中this.submitValue = valuefor (let i = 0; i < this.historyValueArr.length; i++) {if (this.historyValueArr[i] === this.submitValue) {this.historyValueArr.splice(i, 1);break;}}this.historyValueArr.unshift(this.submitValue) //将输入数据添加到历史数据// 若历史记录超过10条,则移除最后一项if (this.historyValueArr.length > 10) {this.historyValueArr.splice(this.historyValueArr.length - 1);}let devices: Array<DeviceBean> = AppStorage.Get("deviceList") as Array<DeviceBean>JSON.stringify(devices);// 增加过滤逻辑this.filteredDevices = devices.filter(item =>item.name.includes(value))})// 搜索结果列表‌:ml-citation{ref="7" data="citationList"}//二维码Scroll(this.scroll){Image($r('app.media.saomiao')).width(35).height(35).objectFit(ImageFit.Contain)}}.margin({top:20})// 轮播图Swiper(this.swiperController) {Image($r('app.media.lunbotu1' )).width('100%').height('100%').objectFit(ImageFit.Auto)     //让图片自适应大小 刚好沾满// .backgroundImageSize(ImageSize.Cover)Image($r('app.media.lbt2' )).width('100%').height('100%').objectFit(ImageFit.Auto)Image($r('app.media.lbt3' )).width('100%').height('100%').objectFit(ImageFit.Auto)Image($r('app.media.lbt4' )).width('100%').height('100%').objectFit(ImageFit.Auto)Image($r('app.media.tips' )).width('100%').height('100%').objectFit(ImageFit.Auto)}.loop(true).autoPlay(true).interval(5000)    //每隔5秒换一张.width('90%').height('25%').borderRadius(20)// 历史记录Row() {// 搜索历史标题Text('搜索历史').fontSize('31lpx').fontColor("#828385")// 清空记录按钮Text('清空记录').fontSize('27lpx').fontColor("#828385")// 清空记录按钮点击事件,清空历史记录数组.onClick(() => {this.historyValueArr.length = 0;})}.margin({top:30})// 设置Row组件的宽度、对齐方式和内外边距.width('100%').justifyContent(FlexAlign.SpaceBetween).padding({left: '37lpx',top: '11lpx',bottom: '11lpx',right: '37lpx'})Row(){// 搜索结果列表‌:ml-citation{ref="7" data="citationList"}List({ space: 10 }) {if (this.filteredDevices.length===0){ListItem() {Text(`暂时未找到任何设备..`).fontColor(Color.White)}}ForEach(this.filteredDevices, (item: DeviceBean) => {ListItem() {Text(`${item.deviceId} (${item.name})`).fontColor(Color.White)}}, item => item.deviceId)}/* List({ space: 10 }) {ForEach(this.filteredDevices, (item: DeviceBean) => {ListItem() {Text('模拟设备1').fontColor(Color.White)}ListItem() {Text('模拟设备2').fontColor(Color.White)}}, item => item.id)}*/}.margin({top:50,left:30})// 使用Flex布局,包裹搜索历史记录Flex({direction: FlexDirection.Row,wrap: FlexWrap.Wrap,}) {// 遍历历史记录数组,创建Text组件展示每一条历史记录ForEach(this.historyValueArr, (item: string, value: number) => {Text(item).padding({left: '15lpx',right: '15lpx',top: '7lpx',bottom: '7lpx'})// 设置背景颜色、圆角和间距.backgroundColor("#EFEFEF").borderRadius(10)// .margin('11lpx').margin({top:5,left:20})})}// 设置Flex容器的宽度和内外边距.width('100%').padding({top: '11lpx',bottom: '11lpx',right: '26lpx'})}.width('100%').height('100%')// .backgroundColor('#f1f2f3').backgroundImage($r('app.media.index_background1')).backgroundImageSize(ImageSize.Cover)}
}
// }

个人主页代码

import router from '@ohos.router';
import promptAction from '@ohos.promptAction';
import UserBean from '../common/bean/UserBean';
import { InfoItem, MineItemList } from '../model/MineItemList';
@Entry
@Component
export struct MineComponent{@State userBean:UserBean = new UserBean()@State nickname:string = this.userBean.getNickName();//昵称@State signature:string = this.userBean.getSignature();//签名build(){Column() {Image($r('app.media.user_avtar1')).width('100%').height('25%').opacity(0.5)Column() {Shape() {Circle({ width: 80, height: 80 }).fill('#3d3f46')Image($r('app.media.user_avtar1')).width(68).height(68).margin({ top: 6, left: 6 }).borderRadius(34)}Text(`${this.nickname}`).fontSize(18).fontWeight(FontWeight.Bold).fontColor(Color.White)Text(`${this.signature}`).fontSize(14).fontColor(Color.Orange)}.width('95%').margin({ top: -34 })//功能列表Shape() {Rect().width('100%').height(240).fill('#3d3f46').radius(40).opacity(0.5)Column() {List() {ForEach(MineItemList, (item: InfoItem) => {ListItem() {// Text(item.title)Row() {Row() {Image(item.icon).width(30).height(30)if (item.title == '个人资料') {Shape() {Rect().width('80%').height(30).opacity(0)Text(item.title).fontSize(22).fontColor(Color.White).margin({ left: 10 })}.onClick(() => {router.pushUrl({url:"myhomepage/PersonalData"})})}else if (item.title == '账号与安全') {Shape() {Rect().width('80%').height(30).opacity(0)Text(item.title).fontSize(22).fontColor(Color.White).margin({ left: 10 })}.onClick(() => {router.pushUrl({url:"myhomepage/AccountSecurity"})})}else if (item.title == '检查更新') {Shape() {Rect().width('80%').height(30).opacity(0)Text(item.title).fontSize(22).fontColor(Color.White).margin({ left: 10 })}.onClick(()=>{promptAction.showToast({message:"当前暂无更新",duration:2000,})})}else if (item.title == '关于') {Shape() {Rect().width('80%').height(30).opacity(0)Text(item.title).fontSize(22).fontColor(Color.White).margin({ left: 10 })}.onClick(()=>{promptAction.showToast({message:"当前版本为1.0.0",duration:2000,})})}else{Text(item.title).fontSize(22).fontColor(Color.White).margin({ left: 10 })}}Image($r('app.media.right')).width(38).height(38)}.width('100%').height(52).justifyContent(FlexAlign.SpaceBetween)}// .border({//   width: { bottom: 1 },//   color: Color.Orange// })}, item => JSON.stringify(item))}.margin(10).border({radius: {topLeft: 24,topRight: 24}})// .backgroundColor('#115f7691').width('95%')// .height('100%').margin({ top: '5%', left: '5%' })}}.margin({ top: 20 }).width('90%')}.width('100%').height('100%').backgroundImage($r('app.media.index_background1')).backgroundImageSize(ImageSize.Cover)}
}

感谢大家的阅读和点赞,你们的支持 是我前进的动力,我会继续保持热爱,贡献自己的微薄码力!

        

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

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

相关文章

C++的*了又*

先看下面一段代码 class HeapWord {friend class VMStructs;private:char *i; };主函数 #include "HeapWord.hpp" int main() {HeapWord *heapword new HeapWord();HeapWord *p new HeapWord();HeapWord **p1 new HeapWord *();heapword 3;*(HeapWord **)p he…

yolov8在windows系统的C++版本的onnxruntime部署方法

1.各个软件的的环境需要保持在统一的版本。 onnxruntime需要和cuda的版本对应上,版本号:onnxruntime-win-x64-gpu-1.18.1 ,链接: NVIDIA - CUDA | onnxruntime cuda:本机显卡支持的版本,cuda11.7,链接:CUDA Toolkit Archive | NVIDIA Developer cudnn:需要对应到cud…

js chrome 插件,下载微博视频

修改说明&#xff1a; 代码资源&#xff0c;免积分下载 起因&#xff0c; 目的: 最初是想下载微博上的NBA视频&#xff0c;因为在看网页上看视频很不方便&#xff0c;快进一次是10秒&#xff0c;而本地 VLC 播放器&#xff0c;快进一次是5秒。另外我还想做点视频剪辑。 对比…

【vue3】@click函数传动态变量参数

根据java的学习&#xff0c;摸索了一下vue3 函数传参的方式。以此作为记录。有更好的其它方式&#xff0c;可以评论区补充。 <script> const tmpref(); </script><button click"tmpFunction(传递参数:tmp)">按钮</button> // 直接【字符串…

jmeter 集成ZAP进行接口测试中的安全扫描 实现方案

以下是将 JMeter 集成 ZAP(OWASP Zed Attack Proxy)进行接口测试中安全扫描的实现方案: 1. 环境准备 JMeter 安装:从 JMeter 官方网站(https://jmeter.apache.org/download_jmeter.cgi)下载并安装 JMeter,确保其版本稳定。ZAP 安装:从 ZAP 官方网站(https://www.zapr…

全能格式转换器v16.3.0.159绿色便携版

前言 全能格式转换器具有音视频格式转换、合并视频、压缩视频、录制视频、下载视频、DVD刻录等功能。以超快的转换速度及强大的功能在国外名声大噪&#xff0c;转换速度是市面同类产品的30倍&#xff0c;操作简便&#xff0c;支持158种视频格式无损转换&#xff0c;批量转换高…

【基于开源insightface的人脸检测,人脸识别初步测试】

简介 InsightFace是一个基于深度学习的开源人脸识别项目,由蚂蚁金服的深度学习团队开发。该项目提供了人脸检测、人脸特征提取、人脸识别等功能,支持多种操作系统和深度学习框架。本文将详细介绍如何在Ubuntu系统上安装和实战InsightFace项目。 目前github有非常多的人脸识…

设计一个简单的权限管理系统

针对大规模服务器集群的权限管理系统设计&#xff0c;需结合 角色分层、最小权限原则 和 动态权限控制 来实现安全高效的权限管理。以下是分阶段设计方案&#xff1a; 一、核心设计思路 基于角色的访问控制&#xff08;RBAC&#xff09; 定义角色层级&#xff08;如董事长 >…

使用 nano 文本编辑器修改 ~/.bashrc 文件与一些快捷键

目录 使用 nano 编辑器保存并关闭文件使用 sed 命令直接修改文件验证更改 如果你正在使用 nano 文本编辑器来修改 ~/.bashrc 文件&#xff0c;以下是保存并关闭文件的具体步骤&#xff1a; 使用 nano 编辑器保存并关闭文件 打开 ~/.bashrc 文件 在终端中运行以下命令&#xf…

spm12_fMRI 2*4混合方差分析 Flexible factorial 对比矩阵

实验设计&#xff1a;2*4被试内设计 分析模型&#xff1a;spm 二阶分析中的 Flexible factorial 问题&#xff1a;Flexible factorial交互作用对比矩阵如何编写&#xff1f; 老师&#xff1a;deepseek老师【大神们看看这个矩阵是否可以如下编写&#xff1f;】 以下是来自de…

用Python修改字体字形与提取矢量数据:fontTools实战指南

字体设计与分析是NLP和视觉领域的交叉应用&#xff0c;而**fontTools** 是一款强大的Python库&#xff0c;可以让我们直接操作字体文件的底层结构。本文将通过两个实用函数&#xff0c;展示如何修改特定字形和提取所有字形的矢量数据&#xff0c;帮助开发者快速上手字体编辑与分…

Windows 11 PowerShell重定向文本文件的编码问题

目录 问题的由来 编码导致的问题 解决办法 VSCode进行转换 记事本进行转换 直接指定输出的文本编码 总结 问题的由来 在我的嵌入式系统的课程中有一个裸机开发的实验&#xff0c;其中需要把图片等文件转换为C语言数组保存在程序中。课程中&#xff0c;我推荐了CodePlea的…

SQL开发的智能助手:通义灵码在IntelliJ IDEA中的应用

SQL 是一种至关重要的数据库操作语言&#xff0c;尽管其语法与通用编程语言有所不同&#xff0c;但因其在众多应用中的广泛使用&#xff0c;大多数程序员都具备一定的 SQL 编写能力。然而&#xff0c;当面对复杂的 SQL 语句或优化需求时&#xff0c;往往需要专业数据库开发工程…

算法——分支限界

学习目标&#xff1a; 掌握算法入门知识 学习内容&#xff1a; 分支限界的定义例题详细步骤讲解&#xff08;找牛&#xff09; 1. 分支限界的定义 分支限界法是一种用于求解 组合优化问题 的算法框架&#xff0c;通过 系统性地搜索解空间树&#xff0c;并结合 剪枝策略 来避…

对接日本金融市场数据全指南:K线、实时行情与IPO新股

一、日本金融市场特色与数据价值 日本作为全球第三大经济体&#xff0c;其金融市场具有以下显著特点&#xff1a; 成熟稳定&#xff1a;日经225指数包含日本顶级蓝筹股独特交易时段&#xff1a;上午9:00-11:30&#xff0c;下午12:30-15:00&#xff08;JST&#xff09;高流动性…

解决opencv中文路径问题

见cv_imread函数和cv_imwrite函数 import cv2 import os import matplotlib.pyplot as plt from paddleocr import PaddleOCR, draw_ocr import numpy as np import urllib.parse # Add this import statementfrom txt_get import ImageTextExtractor# 初始化OCR&#xff0c;…

Linux中的Vim与Nano编辑器命令详解

&#x1f4e2; 友情提示&#xff1a; 本文由银河易创AI&#xff08;https://ai.eaigx.com&#xff09;平台gpt-4-turbo模型辅助创作完成&#xff0c;旨在提供灵感参考与技术分享&#xff0c;文中代码与命令建议通过官方渠道验证。 在Linux系统中&#xff0c;文本编辑是最常用的…

宝马集团加速 ERP 转型和上云之旅

宝马集团&#xff08;BMW Group&#xff09;作为全球领先的豪华汽车和摩托车制造商&#xff0c;致力于构建更加智能、绿色、人性化的出行体验。为了支持其全球化、数字化业务战略&#xff0c;宝马集团正在进行大规模的 IT 体系升级和 ERP 云转型。该项目以“RISE with SAP S/4H…

大数据学习(105)-Hbase

&#x1f34b;&#x1f34b;大数据学习&#x1f34b;&#x1f34b; &#x1f525;系列专栏&#xff1a; &#x1f451;哲学语录: 用力所能及&#xff0c;改变世界。 &#x1f496;如果觉得博主的文章还不错的话&#xff0c;请点赞&#x1f44d;收藏⭐️留言&#x1f4dd;支持一…

【数学建模】

全国大学生数学建模竞赛(CUMCM)历年试题速浏(查看超级方便)_全国大学生数学建模竞赛真题-CSDN博客 高教社杯全国大学生数学建模竞赛历年赛题&#xff08;含解析、评阅&#xff09; - 赛氪教育 年份 赛题 真题 问题类型 对应算法及模型 2023年 A题 定日镜场的优化设计 …