flutter 手写日历组件

先看效果

 直接上代码

calendar_popup_view.dart

import 'package:flutter/material.dart';
import 'package:intl/intl.dart';import 'custom_calendar.dart';
import 'hotel_app_theme.dart';class CalendarPopupView extends StatefulWidget {const CalendarPopupView({required this.initialStartDate,required this.initialEndDate,required this.onApplyClick,required this.onCancelClick,required this.state,this.minimumDate,this.maximumDate,this.barrierDismissible = true,super.key,});final DateTime? minimumDate;final DateTime? maximumDate;final bool barrierDismissible;final DateTime initialStartDate;final DateTime initialEndDate;final Function(DateTime, DateTime) onApplyClick;final Function onCancelClick;final Function state;@overrideState<CalendarPopupView> createState() => _CalendarPopupViewState();
}class _CalendarPopupViewState extends State<CalendarPopupView>with TickerProviderStateMixin {late DateTime startDate;late DateTime endDate;late final AnimationController animationController;late DateTime curSelectStartData;late DateTime curSelectEndData;@overridevoid initState() {super.initState();animationController = AnimationController(duration: const Duration(milliseconds: 400), vsync: this);startDate = widget.initialStartDate;endDate = widget.initialEndDate;curSelectStartData = startDate;curSelectEndData = endDate;animationController.forward();}@overridevoid dispose() {animationController.dispose();super.dispose();}@overrideWidget build(BuildContext context) {return AnimatedBuilder(animation: animationController,builder: (BuildContext context, _) {return AnimatedOpacity(duration: const Duration(milliseconds: 100),opacity: animationController.value,child: InkWell(splashColor: Colors.transparent,focusColor: Colors.transparent,highlightColor: Colors.transparent,hoverColor: Colors.transparent,onTap: () {if (widget.barrierDismissible) {Navigator.pop(context);}},child: Container(decoration: BoxDecoration(color: HotelAppTheme.buildLightTheme().colorScheme.background,borderRadius: const BorderRadius.all(Radius.circular(24.0)),boxShadow: <BoxShadow>[BoxShadow(color: Colors.grey.withOpacity(0.2),offset: const Offset(4, 4),blurRadius: 8.0),],),child: Column(mainAxisAlignment: MainAxisAlignment.center,crossAxisAlignment: CrossAxisAlignment.start,mainAxisSize: MainAxisSize.min,children: <Widget>[Row(children: <Widget>[Expanded(child: Column(mainAxisAlignment: MainAxisAlignment.center,children: <Widget>[Text('From',textAlign: TextAlign.left,style: grayTitle(),),const SizedBox(height: 4,),Text(DateFormat('EEE, dd MMM').format(curSelectStartData),style:curSelectStartData == widget.initialStartDate? grayTime(): primaryTime(),),],),),Container(height: 74,width: 1,color: HotelAppTheme.buildLightTheme().dividerColor,),Expanded(child: Column(mainAxisAlignment: MainAxisAlignment.center,children: <Widget>[Text('To',style: grayTitle(),),const SizedBox(height: 4),Text(DateFormat('EEE, dd MMM').format(curSelectEndData),style: curSelectEndData == widget.initialEndDate? grayTime(): primaryTime(),),],),)],),const Divider(height: 1),CustomCalendarView(minimumDate: widget.minimumDate,maximumDate: widget.maximumDate,initialEndDate: widget.initialEndDate,initialStartDate: widget.initialStartDate,startEndDateChange:(DateTime startDateData, DateTime endDateData) {if (mounted) {setState(() {startDate = startDateData;endDate = endDateData;curSelectStartData = startDateData;curSelectEndData = endDateData;});toUpdateState();}},endDateChange: (DateTime endData) {print("endDateChange");setState(() {endDate = endData;curSelectEndData = endData;});toUpdateState();},startDateChange: (DateTime startData) {print("startDateChange");setState(() {startDate = startData;curSelectStartData = startData;});toUpdateState();}),Padding(padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 8),child: Container(height: 48,decoration: BoxDecoration(color: HotelAppTheme.buildLightTheme().primaryColor,borderRadius:const BorderRadius.all(Radius.circular(24.0)),boxShadow: <BoxShadow>[BoxShadow(color: Colors.grey.withOpacity(0.6),blurRadius: 8,offset: const Offset(4, 4),),],),child: Material(color: Colors.transparent,child: InkWell(borderRadius:const BorderRadius.all(Radius.circular(24.0)),highlightColor: Colors.transparent,onTap: () {try {// animationController?.reverse().then((f) {// });widget.onApplyClick(startDate, endDate);Navigator.pop(context);} catch (_) {}},child: const Center(child: Text('Apply',style: TextStyle(fontWeight: FontWeight.w500,fontSize: 18,color: Colors.white),),),),),),)],),),),);},);}toUpdateState() {widget.state(() {});}TextStyle grayTitle() {return const TextStyle(fontWeight: FontWeight.w100,fontSize: 16,color: Color(0xff676970),);}TextStyle grayTime() {return const TextStyle(fontWeight: FontWeight.bold,fontSize: 16,color: Color(0xff45474D),);}TextStyle primaryTime() {return TextStyle(fontWeight: FontWeight.bold,fontSize: 16,color: HotelAppTheme.buildLightTheme().primaryColorDark,);}
}

custom_calendar.dart

import 'package:app/common/util/k_date_util.dart';
import 'package:app/common/util/k_log_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:intl/intl.dart';import 'hotel_app_theme.dart';class CustomCalendarView extends StatefulWidget {const CustomCalendarView({required this.initialStartDate,required this.initialEndDate,required this.startEndDateChange,required this.startDateChange,required this.endDateChange,this.minimumDate,this.maximumDate,super.key,});final DateTime? minimumDate;final DateTime? maximumDate;final DateTime initialStartDate;final DateTime initialEndDate;final Function(DateTime, DateTime) startEndDateChange;final Function(DateTime) startDateChange;final Function(DateTime) endDateChange;@overrideState<CustomCalendarView> createState() => _CustomCalendarViewState();
}class _CustomCalendarViewState extends State<CustomCalendarView> {List<DateTime> dateList = <DateTime>[];DateTime currentMonthDate = DateTime.now();DateTime? startDate;DateTime? endDate;@overridevoid initState() {super.initState();setListOfDate(currentMonthDate);startDate = widget.initialStartDate;endDate = widget.initialEndDate;}@overridevoid dispose() {super.dispose();}void setListOfDate(DateTime monthDate) {dateList.clear();final DateTime newDate = DateTime(monthDate.year, monthDate.month, 0);int previousMothDay = 0;if (newDate.weekday < 7) {previousMothDay = newDate.weekday;for (int i = 1; i <= previousMothDay; i++) {dateList.add(newDate.subtract(Duration(days: previousMothDay - i)));}}for (int i = 0; i < (42 - previousMothDay); i++) {dateList.add(newDate.add(Duration(days: i + 1)));}// if (dateList[dateList.length - 7].month != monthDate.month) {//   dateList.removeRange(dateList.length - 7, dateList.length);// }}@overrideWidget build(BuildContext context) {return Container(child: Column(children: <Widget>[Padding(padding:const EdgeInsets.only(left: 8.0, right: 8.0, top: 4, bottom: 4),child: Row(children: <Widget>[Padding(padding: const EdgeInsets.all(8.0),child: Container(height: 38,width: 38,decoration: BoxDecoration(borderRadius:const BorderRadius.all(Radius.circular(24.0)),border: Border.all(color: HotelAppTheme.buildLightTheme().dividerColor,),),child: InkWell(borderRadius:const BorderRadius.all(Radius.circular(24.0)),onTap: () {if (mounted) {setState(() {if (getCurMonthIsInMinMaxRange(DateTime(currentMonthDate.year,currentMonthDate.month,0))) {currentMonthDate = DateTime(currentMonthDate.year,currentMonthDate.month, 0);setListOfDate(currentMonthDate);}});}},child: const Icon(Icons.keyboard_arrow_left,color: Colors.grey,),),),),Expanded(child: Center(child: Text(DateFormat('MMMM, yyyy').format(currentMonthDate),style: TextStyle(fontWeight: FontWeight.w500,fontSize: 15.sp,color: Colors.white,),),),),Padding(padding: const EdgeInsets.all(8.0),child: Container(height: 38,width: 38,decoration: BoxDecoration(borderRadius:const BorderRadius.all(Radius.circular(24.0)),border: Border.all(color: HotelAppTheme.buildLightTheme().dividerColor,),),child: InkWell(borderRadius:const BorderRadius.all(Radius.circular(24.0)),onTap: () {if (mounted) {setState(() {if (getCurMonthIsInMinMaxRange(DateTime(currentMonthDate.year,currentMonthDate.month + 2,0))) {currentMonthDate = DateTime(currentMonthDate.year,currentMonthDate.month + 2, 0);setListOfDate(currentMonthDate);}});}},child: const Icon(Icons.keyboard_arrow_right,color: Colors.grey,),),),),],),),Padding(padding: const EdgeInsets.only(right: 8, left: 8, bottom: 8),child: Row(children: getDaysNameUI(),),),Padding(padding: const EdgeInsets.only(right: 8, left: 8),child: Column(children: getDaysNoUI(),),),],),);}List<Widget> getDaysNameUI() {final List<Widget> listUI = <Widget>[];final weekendList = [5, 6];for (int i = 0; i < 7; i++) {listUI.add(Expanded(child: Center(child: Text(DateFormat('EEE').format(dateList[i]),style: TextStyle(fontSize: 14.sp,fontWeight: FontWeight.w500,color: weekendList.contains(i)? HotelAppTheme.buildLightTheme().primaryColorDark: Colors.white,),),),),);}return listUI;}List<Widget> getDaysNoUI() {final List<Widget> noList = <Widget>[];int count = 0;for (int i = 0; i < dateList.length / 7; i++) {final List<Widget> listUI = <Widget>[];for (int i = 0; i < 7; i++) {final DateTime date = dateList[count];listUI.add(Expanded(child: AspectRatio(aspectRatio: 1.0,child: Stack(children: <Widget>[Padding(padding: const EdgeInsets.only(top: 3, bottom: 3),child: Padding(padding: EdgeInsets.only(top: 0,bottom: 0,left: isStartDateRadius(date) ? 4 : 0,right: isEndDateRadius(date) ? 4 : 0),child: Container(decoration: BoxDecoration(color: startDate != null && endDate != null? getIsItStartAndEndDate(date) ||getIsInRange(date)? HotelAppTheme.buildLightTheme().primaryColorDark.withOpacity(0.1): Colors.transparent: Colors.transparent,borderRadius: BorderRadius.only(bottomLeft: isStartDateRadius(date)? Radius.circular(15.r): const Radius.circular(0.0),topLeft: isStartDateRadius(date)? Radius.circular(15.r): const Radius.circular(0.0),topRight: isEndDateRadius(date)? Radius.circular(15.r): const Radius.circular(0.0),bottomRight: isEndDateRadius(date)? Radius.circular(15.r): const Radius.circular(0.0),),),),),),InkWell(borderRadius: const BorderRadius.all(Radius.circular(32.0)),onTap: () {if (currentMonthDate.month == date.month) {final DateTime? minimumDate = widget.minimumDate;final DateTime? maximumDate = widget.maximumDate;if (minimumDate != null && maximumDate != null) {final DateTime newminimumDate = DateTime(minimumDate.year,minimumDate.month,minimumDate.day - 1);final DateTime newmaximumDate = DateTime(maximumDate.year,maximumDate.month,maximumDate.day + 1);if (date.isAfter(newminimumDate) &&date.isBefore(newmaximumDate)) {onDateClick(date);}} else if (minimumDate != null) {final DateTime newminimumDate = DateTime(minimumDate.year,minimumDate.month,minimumDate.day - 1);if (date.isAfter(newminimumDate)) {onDateClick(date);}} else if (maximumDate != null) {final DateTime newmaximumDate = DateTime(maximumDate.year,maximumDate.month,maximumDate.day + 1);if (date.isBefore(newmaximumDate)) {onDateClick(date);}} else {onDateClick(date);}}},child: Padding(padding: const EdgeInsets.all(2),child: Container(decoration: BoxDecoration(color: getIsItStartAndEndDate(date)? HotelAppTheme.buildLightTheme().primaryColorDark: Colors.transparent,borderRadius: getStartOrEndPoint(date),// border: Border.all(//   color: getIsItStartAndEndDate(date)//       ? Colors.white//       : Colors.transparent,//   width: 2,// ),// boxShadow: getIsItStartAndEndDate(date)//     ? <BoxShadow>[//         BoxShadow(//             color: Colors.grey.withOpacity(0.6),//             blurRadius: 4),//       ]//     : null,),child: Center(child: Text('${date.day}',style: ceilStyle(date),),),),),),Positioned(bottom: 9,right: 0,left: 0,child: Container(height: 6,width: 6,decoration: BoxDecoration(color: DateTime.now().day == date.day &&DateTime.now().month == date.month &&DateTime.now().year == date.year? getIsInRange(date)? Colors.white: HotelAppTheme.buildLightTheme().primaryColorDark: Colors.transparent,shape: BoxShape.circle),),),],),),),);count += 1;}noList.add(Row(mainAxisAlignment: MainAxisAlignment.center,mainAxisSize: MainAxisSize.min,children: listUI,));}return noList;}BorderRadius getStartOrEndPoint(DateTime date) {KLogUtil.log([startDate, endDate, KDateUtils.isSome(startDate, endDate)]);if (startDate.toString() == endDate.toString()) {return BorderRadius.all(Radius.circular(15.r),);} else if (getIsItStart(date)) {return BorderRadius.only(topLeft: Radius.circular(15.r),bottomLeft: Radius.circular(15.r),);} else {return BorderRadius.only(topRight: Radius.circular(15.r),bottomRight: Radius.circular(15.r),);}}// 日期每一格的样式TextStyle ceilStyle(DateTime date) {// 不能选择日期的样式if (!getIsInMinMaxRange(date)) {return TextStyle(color: Colors.grey.withOpacity(0.6),fontSize: MediaQuery.of(context).size.width > 360 ? 14.sp : 16.sp,fontWeight:getIsItStartAndEndDate(date) ? FontWeight.bold : FontWeight.normal,);}return TextStyle(color: getIsItStartAndEndDate(date) || getIsInRange(date)? Colors.white: currentMonthDate.month == date.month? Colors.white: Colors.grey.withOpacity(0.6),fontSize: MediaQuery.of(context).size.width > 360 ? 14.sp : 16.sp,fontWeight:getIsItStartAndEndDate(date) ? FontWeight.bold : FontWeight.normal);}bool getIsInMinMaxRange(DateTime date) {if (widget.minimumDate != null && widget.maximumDate != null) {if (date.isAfter(widget.minimumDate!) &&date.isBefore(widget.maximumDate!)) {return true;}}return false;}// 当前月份是否在bool getCurMonthIsInMinMaxRange(DateTime tgtMonth) {if (widget.minimumDate != null && widget.maximumDate != null) {if (tgtMonth.isAfter(DateTime(widget.minimumDate!.year, widget.minimumDate!.month, 0)) &&tgtMonth.isBefore(DateTime(widget.maximumDate!.year, widget.maximumDate!.month + 2, 0))) {return true;}}return false;}bool getIsInRange(DateTime date) {if (startDate != null && endDate != null) {if (date.isAfter(startDate!) && date.isBefore(endDate!)) {return true;}}return false;}bool getIsItStartAndEndDate(DateTime date) {if ((startDate != null &&startDate!.day == date.day &&startDate!.month == date.month &&startDate!.year == date.year) ||(endDate != null &&endDate!.day == date.day &&endDate!.month == date.month &&endDate!.year == date.year)) return true;return false;}bool getIsItStart(DateTime date) {if (startDate != null &&startDate!.day == date.day &&startDate!.month == date.month &&startDate!.year == date.year) return true;return false;}bool isStartDateRadius(DateTime date) {if (startDate != null &&startDate!.day == date.day &&startDate!.month == date.month) {return true;} else if (date.weekday == 1) {return true;} else {return false;}}bool isEndDateRadius(DateTime date) {if (endDate != null &&endDate!.day == date.day &&endDate!.month == date.month) {return true;} else if (date.weekday == 7) {return true;} else {return false;}}void onDateClick(DateTime date) {if (startDate == null) {startDate = date;} else if (startDate != date && endDate == null) {endDate = date;} else if (startDate!.day == date.day && startDate!.month == date.month) {// startDate = null;endDate = startDate;} else if (endDate != null &&endDate!.day == date.day &&endDate!.month == date.month) {if (endDate != null) {startDate = endDate;} else {endDate = null;}}if (startDate == null && endDate != null) {startDate = endDate;endDate = null;}if (startDate != null && endDate != null) {if (!endDate!.isAfter(startDate!)) {final DateTime d = startDate!;startDate = endDate;endDate = d;}if (date.isBefore(startDate!)) {startDate = date;} else if (date.isAfter(endDate!)) {endDate = date;} else {final int daysToStartDate = startDate!.difference(date).inDays.abs();final int daysToEndDate = endDate!.difference(date).inDays.abs();daysToStartDate > daysToEndDate ? endDate = date : startDate = date;}}if (mounted) {setState(() {if (startDate != null && endDate != null) {try {widget.startEndDateChange(startDate!, endDate!);} catch (_) {}}if (startDate != null) {try {widget.startDateChange(startDate!);} catch (_) {}}if (endDate != null) {try {widget.endDateChange(endDate!);} catch (_) {}}},);}}
}

hotel_app_theme.dart

import 'package:flutter/material.dart';class HotelAppTheme {static TextTheme _buildTextTheme(TextTheme base) {const String fontName = 'WorkSans';return base.copyWith(displayLarge: base.displayLarge?.copyWith(fontFamily: fontName),displayMedium: base.displayMedium?.copyWith(fontFamily: fontName),displaySmall: base.displaySmall?.copyWith(fontFamily: fontName),headlineMedium: base.headlineMedium?.copyWith(fontFamily: fontName),headlineSmall: base.headlineSmall?.copyWith(fontFamily: fontName),titleLarge: base.titleLarge?.copyWith(fontFamily: fontName),labelLarge: base.labelLarge?.copyWith(fontFamily: fontName),bodySmall: base.bodySmall?.copyWith(fontFamily: fontName),bodyLarge: base.bodyLarge?.copyWith(fontFamily: fontName),bodyMedium: base.bodyMedium?.copyWith(fontFamily: fontName),titleMedium: base.titleMedium?.copyWith(fontFamily: fontName),titleSmall: base.titleSmall?.copyWith(fontFamily: fontName),labelSmall: base.labelSmall?.copyWith(fontFamily: fontName),);}static ThemeData buildLightTheme() {// #54D3C2// #54D3C2// #4677FFconst Color primaryColor = Color(0xff1C1D1F);const Color secondaryColor = Color(0xff1C1D1F);const Color primaryColorDark = Color(0xff4677FF);final ColorScheme colorScheme = const ColorScheme.light().copyWith(primary: primaryColor,secondary: secondaryColor,);final ThemeData base = ThemeData.light();return base.copyWith(primaryColor: primaryColor,primaryColorDark: primaryColorDark,indicatorColor: Colors.white,splashColor: Colors.white24,splashFactory: InkRipple.splashFactory,canvasColor: Colors.white,// #F6F6F6scaffoldBackgroundColor: const Color(0xFFF6F6F6),buttonTheme: ButtonThemeData(colorScheme: colorScheme,textTheme: ButtonTextTheme.primary,),textTheme: _buildTextTheme(base.textTheme),primaryTextTheme: _buildTextTheme(base.primaryTextTheme),platform: TargetPlatform.iOS,colorScheme: colorScheme.copyWith(background: const Color(0xff1C1D1F))// #B00020.copyWith(error: const Color(0xFFB00020)),);}
}

RangePicker.dart  这个文件是使用的地方 这里还使用到了  getx 的组件 从底部弹出

// ignore_for_file: file_namesimport 'package:app/gen/assets.gen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';import 'calendar_popup_view.dart';class RangePicker extends StatefulWidget {RangePicker({super.key, required this.apply});final Function(DateTime, DateTime) apply;@overrideState<RangePicker> createState() => _RangePickerState();
}class _RangePickerState extends State<RangePicker> {DateTime startDate = DateTime.now().subtract(const Duration(days: 90));DateTime endDate = DateTime.now();@overrideWidget build(BuildContext context) {return GestureDetector(onTap: () {openCalendarPopupView(context);},child: Row(children: [Text("${DateFormat('MM/dd').format(startDate)} - ${DateFormat('MM/dd').format(endDate)}",style: TextStyle(color: const Color(0xff676970),fontWeight: FontWeight.w500,fontSize: 12.sp,),),SizedBox(width: 4.w,),Assets.icon.botomArrowhead.image(width: 17.w),],),);}void openCalendarPopupView(BuildContext context) {Get.bottomSheet(isScrollControlled: true,StatefulBuilder(builder: (context, state) {return CalendarPopupView(state: state,minimumDate: DateTime.now().subtract(const Duration(days: 365)),maximumDate: DateTime.now(),initialEndDate: endDate,initialStartDate: startDate,onApplyClick: (DateTime startData, DateTime endData) {if (mounted) {setState(() {startDate = startData;endDate = endData;});state(() {startDate = startData;endDate = endData;});widget.apply(startDate, endDate);}},onCancelClick: () {},);}),);}
}

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

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

相关文章

OpenCV项目开发实战--相机校准—并附实例Python/C++代码实现

介绍 相机标定是计算机视觉中的一项基本任务在 3D 重建、对象跟踪、增强现实和图像分析等各种应用中至关重要。准确的校准通过校正失真和估计相机的内在和外在参数来确保精确的测量和可靠的分析。这本综合指南深入探讨了相机校准的原理、技术和算法。我们探索获取相机的内在和…

macOS使用ffmpeg与QT进行音视频推拉流

1.先启动流服务器 ./mediamtx 2.开始推流: ffmpeg -re -stream_loop -1 -i /Users/hackerx/Desktop/test.mp4 -c copy -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/stream 3. 安装ffmpeg 4.4 brew install ffmpeg4 4.添加ffmpeg头文件目录与库目录 5.链接ffmpeg相关库…

Flink窗口分类简介及示例代码

水善利万物而不争&#xff0c;处众人之所恶&#xff0c;故几于道&#x1f4a6; 文章目录 1. 流式计算2. 窗口3. 窗口的分类◆ 基于时间的窗口&#xff08;时间驱动&#xff09;1) 滚动窗口&#xff08;Tumbling Windows&#xff09;2) 滑动窗口&#xff08;Sliding Windows&…

Axure RP移动端高保真CRM办公客户管理系统原型模板及元件库

Axure RP移动端高保真CRM办公客户管理系统原型模板及元件库&#xff0c;一套典型的移动端办公工具型APP Axure RP原型模板&#xff0c;可根据实际的产品需求进行扩展&#xff0c;也可以作为移动端原型设计的参考案例。为提升本作品参考价值&#xff0c;在模板设计过程中尽量追求…

VVIC-据关键词取商品列表

一、接口参数说明&#xff1a; item_search-根据关键词取商品列表&#xff0c;点击更多API调试&#xff0c;请移步注册API账号点击获取测试key和secret 公共参数 请求地址: https://api-gw.onebound.cn/vvic/item_search 名称类型必须描述keyString是调用key&#xff08;点击…

c++中的多态

文章目录 1.多态的概念1.1概念 2.多态的定义及实现2.1多态的构成条件2.2虚函数2.3虚函数的重写2.4 C11 override 和 final2.5 重载、覆盖(重写)、隐藏(重定义)的对比 3. 抽象类3.1概念3.2接口继承和实现继承 4.多态的原理4.1虚函数表4.2多态原理分析4.3 动态绑定与静态绑定 5.单…

仿到位|独立版家政上门预约服务小程序家政保洁师傅上门服务小程序上门服务在线派单源码

上门预约服务派单小程序家政 小程序 同城预约 开源代码 独立版. 程序完整,经过安装检测,可放心下载安装。 适合本地的一款上门预约服务小程序,功能丰富,适用多种场景。 程序功能:城市管理/小程序DIY/服务订单/师傅管理/会员卡功能/营销功能/文章功能等等

【深度学习 video detect】Towards High Performance Video Object Detection for Mobiles

文章目录 摘要IntroductionRevisiting Video Object Detection BaselinePractice for Mobiles Model Architecture for MobilesLight Flow 摘要 尽管在桌面GPU上取得了视频目标检测的最近成功&#xff0c;但其架构对于移动设备来说仍然过于沉重。目前尚不清楚在非常有限的计算…

【人工智能前沿弄潮】——生成式AI系列:Diffusers应用 (2) 训练扩散模型(无条件图像生成)

无条件图像生成是扩散模型的一种流行应用&#xff0c;它生成的图像看起来像用于训练的数据集中的图像。与文本或图像到图像模型不同&#xff0c;无条件图像生成不依赖于任何文本或图像。它只生成与其训练数据分布相似的图像。通常&#xff0c;通过在特定数据集上微调预训练模型…

jxls导出问题

![请添加图片描述](https://img-blog.csdnimg.cn/bc74c4207818491c93b75e19b3333451.png 为什么最后导出的文件还是按原样导出啊&#xff0c;没有填充数据 ![在这里插入图片描述](https://img-blog.csdnimg.cn/d4500b9a98c042f6b64a5d0650071303.png

云安全攻防(八)之 Docker Remote API 未授权访问逃逸

Docker Remote API 未授权访问逃逸 基础知识 Docker Remote API 是一个取代远程命令行界面&#xff08;rcli&#xff09;的REST API&#xff0c;其默认绑定2375端口&#xff0c;如管理员对其配置不当可导致未授权访问漏洞。攻击者利用 docker client 或者 http 直接请求就可以…

【PostgreSQL的CLOG解析】

同样还是这张图&#xff0c;之前发过shared_buffer和os cache、wal buffer和work mem的文章&#xff0c;今天的主题是图中的clog&#xff0c;即 commit log&#xff0c;PostgreSQL10之前放在数据库目录的pg_clog下面。PostgreSQL10之后修更名为xact,数据目录变更为pg_xact下面&…

Vue+SpringBoot项目开发:登录页面美化,登录功能实现(三)

写在开始:一个搬砖程序员的随缘记录上一章写了从零开始VueSpringBoot后台管理系统&#xff1a;Vue3TypeScript项目搭建 VueTypeScript的前端项目已经搭建完成了 这一章的内容是引入element-plus和axios实现页面的布局和前后端数据的串联&#xff0c;实现一个登陆的功能&#x…

CSS变形与动画(一):transform变形 与 transition过渡动画 详解(用法 + 代码 + 例子 + 效果)

文章目录 变形与动画transform 变形translate 位移scale 缩放rotate 旋转skew 倾斜多种变形设置变形中心点 transition 过渡动画多种属性变化 变形与动画 transform 变形 包括&#xff1a;位移、旋转、缩放、倾斜。 下面的方法都是transform里的&#xff0c;记得加上。 展示效…

Apache Maven:从构建到部署,一站式解决方案

目录 一、Maven介绍 1. Maven是什么&#xff1f; 2.Maven的作用&#xff1f; 二、Maven仓库介绍 2.1 库的分类 三、Maven安装与配置 3.1 Maven安装 3.2 Maven环境配置 3.3 仓库配置 四、Eclipse与Maven配置 五、Maven项目测试 5.1 新建Maven项目步骤及注意事项 5.…

C/C++test两步完成CMake项目静态分析

您可能一直在静态分析中使用CMake。但您是否尝试过将Parasoft C/Ctest与CMake一起使用吗&#xff1f;以下是如何使用C/Ctest在基于CMake的项目中运行静态分析的详细说明。 CMake是用于构建、测试和打包软件的最流行的工具之一。Parasoft C/Ctest通过简化构建管理过程&#xff…

RabbitMQ基础(2)——发布订阅/fanout模式 topic模式 rabbitmq回调确认 延迟队列(死信)设计

目录 引出点对点(simple)Work queues 一对多发布订阅/fanout模式以登陆验证码为例pom文件导包application.yml文件rabbitmq的配置生产者生成验证码&#xff0c;发送给交换机消费者消费验证码 topic模式配置类增加配置生产者发送信息进行发送控制台查看 rabbitmq回调确认配置类验…

Redis_缓存1_缓存类型

14.redis缓存 14.1简介 穿透型缓存&#xff1a; 缓存与后端数据交互在一起&#xff0c;对服务端的调用隐藏细节。如果从缓存中可以读到数据&#xff0c;就直接返回&#xff0c;如果读不到&#xff0c;就到数据库中去读取&#xff0c;从数据库中读到数据&#xff0c;也是先更…

制造执行系统(MES)在新能源领域的应用

制造执行系统&#xff08;MES&#xff09;在新能源领域有许多应用&#xff0c;特别是在管理、监控和优化新能源生产过程方面。新能源包括太阳能、风能、生物质能、地热能等。以下是一些MES在新能源方面的应用领域&#xff1a; 生产计划与调度&#xff1a;MES可以协助规划和调度…

谷粒商城第十一天-品牌管理中关联分类

目录 一、总述 二、前端部分 1. 调整查询调用 2. 关联分类 三、后端部分 四、总结 一、总述 之前是在商品的分类管理中直接使用的若依的逆向代码 有下面的几个问题&#xff1a; 1. 表格上面的参数填写之后&#xff0c;都是按照完全匹配进行搜索&#xff0c;没有模糊匹配…