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

DeepSeek 助力 Vue 开发:打造丝滑的日期选择器(Date Picker),未使用第三方插件

前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏+关注哦 💕

共同探索软件研发!敬请关注【宝码香车】
关注描述

csdngif标识

目录

  • DeepSeek 助力 Vue 开发:打造丝滑的日期选择器(Date Picker),未使用第三方插件
    • 📚前言
    • 📚进入安装好的DeepSeek
    • 📚页面效果
    • 📚指令输入
        • **属性(Props)**
        • **事件(Events)**
      • 📘组件代码,src\components\DatePicker\DatePicker.vue
      • 📘调用 src\views\DatePickerView.vue
    • 📚代码测试
    • 📚测试代码正常跑通,附其他基本代码
      • 📘编写路由 src\router\index.js
      • 📘编写展示入口 src\App.vue
    • 📚页面效果
    • 📚自己部署 DeepSeek 安装地址
    • 📚相关文章


📚📗📕📘📖🕮💡📝🗂️✍️🛠️💻🚀🎉🏗️🌐🖼️🔗📊👉🔖⚠️🌟🔐⬇️·正文开始⬇️·🎥😊🎓📩😺🌈🤝🤖📜📋🔍✅🧰❓📄📢📈 🙋0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣🔟🆗*️⃣#️⃣

DeepSeek 助力 Vue 开发:打造丝滑的日期选择器(Date Picker),未使用第三方插件

📚前言

苏商银行同样在积极应用 DeepSeek。应用 DeepSeek VL2 多模态模型处理非标材料,如表格、影像资料、文档图片等识别,提升信贷材料综合识别准确率至 97%,并将 DeepSeek R1 推理模型集成到自主研发的 “开发助手”,使核心系统迭代周期缩短 30%。此外,苏商银行将 DeepSeek 的蒸馏技术应用于信贷风控、反欺诈等 20 多个场景,使尽调报告生成效率提升 40%,欺诈风险标签准确率提升 35% 。

这些应用案例表明,DeepSeek 在金融领域的智能合同质检、信贷风控、自动化估值对账等场景中,能够通过对海量金融数据的挖掘与分析,实现金融语义理解准确率与业务效率的双突破,重塑金融服务模式。

📚进入安装好的DeepSeek

0基础3步部署自己的DeepSeek安装步骤

打开搭建好的DeepSeek应用。

DeepSeek应用

进入应用。

进入DeepSeek应用

📚页面效果

页面效果

📚指令输入

已经创建好了一个基于Vue3的组合式API的项目(Composition API),并能正常运行起来,请帮我用 Vue3的组合式API(Composition API) 生成一个 日期选择器(Date Picker) 的功能组件,所有代码都保存在components/DatePicker 下的文件夹中。功能组件的script标签中只有setup属性,使用普通 JavaScript 实现,不使用TypeScript。
功能要有,如下属性:

属性(Props)
  1. modelValue

    • 类型:Date | Date[] | null
    • 默认值:null
    • 说明:绑定的日期值(支持 v-model,范围选择时为数组)。
  2. minDate

    • 类型:Date | null
    • 默认值:null
    • 说明:最小可选日期,早于此日期的选项被禁用。
  3. maxDate

    • 类型:Date | null
    • 默认值:null
    • 说明:最大可选日期,晚于此日期的选项被禁用。
  4. format

    • 类型:string
    • 默认值:'YYYY-MM-DD'
    • 说明:日期显示格式(如 YYYY-MM-DDMM/DD/YYYY)。
  5. disabled

    • 类型:boolean
    • 默认值:false
    • 说明:是否禁用组件。
  6. placeholder

    • 类型:string
    • 默认值:'请选择日期'
    • 说明:输入框占位符文本。
  7. firstDayOfWeek

    • 类型:number(0-6,0=周日)
    • 默认值:1(周一)
    • 说明:周起始日。
  8. showWeekNumbers

    • 类型:boolean
    • 默认值:false
    • 说明:是否显示周数。
  9. isRange

    • 类型:boolean
    • 默认值:false
    • 说明:是否为范围选择模式(modelValueDate[])。
  10. locale

    • 类型:string | object
    • 默认值:'en'
    • 说明:本地化配置(语言、月份名等)。
  11. isInline

    • 类型:boolean
    • 默认值:false
    • 说明:是否内联显示日历面板(无需点击输入框)。
  12. className

    • 类型:string
    • 默认值:''
    • 说明:自定义容器类名。
  13. showConfirmButton

    • 类型:boolean
    • 默认值:true
    • 说明:是否显示确认按钮。
  14. confirmText

    • 类型:string
    • 默认值:'确认'
    • 说明:确认按钮文本。
  15. disableDate

    • 类型:(date: Date) => boolean
    • 默认值:() => false
    • 说明:动态禁用日期(返回 true 表示禁用)。

事件(Events)
  1. update:modelValue

    • 参数:Date | Date[] | null
    • 说明:选中日期变化时触发(用于 v-model 同步)。
  2. change

    • 参数:{ value: Date | Date[] | null, isValid: boolean }
    • 说明:日期变化时触发,附带有效性校验。
  3. confirm

    • 参数:Date | Date[] | null
    • 说明:点击确认按钮时触发。
  4. open

    • 参数:无
    • 说明:日历面板打开时触发。
  5. close

    • 参数:无
    • 说明:日历面板关闭时触发。
  6. invalid

    • 参数:{ reason: string }
    • 说明:用户输入或选择无效日期时触发。

你有更好的建议也可以添加,要注明。组件定义好后给出3个及以上的调用示例。
下面是现有目录
vueAndDeepseek/
├── src/ # 源代码目录
│ ├── assets/ # 静态资源
│ │ ├── base.css
│ │ ├── main.css
│ │ └── logo.svg
│ ├── components/ # 组件目录
│ │ ├── HelloWorld.vue
│ │ ├── TheWelcome.vue
│ │ ├── WelcomeItem.vue
│ │ ├── Progress/
│ │ │ └── Progress.vue
│ │ ├── Accordion/
│ │ ├── BackToTop/
│ │ ├── Card/
│ │ ├── InfiniteScroll/
│ │ ├── Notification/
│ │ ├── Timeline/
│ │ ├── Switch/
│ │ ├── Tabs/
│ │ ├── Sidebar/
│ │ ├── Breadcrumbs/
│ │ ├── MasonryLayout/
│ │ ├── Rating/
│ │ ├── DatePicker/
│ │ └── icons/
│ ├── router/ # 路由配置
│ │ └── index.js
│ ├── stores/ # Pinia 状态管理
│ │ └── counter.js
│ ├── views/ # 页面组件
│ │ ├── ProgressView.vue
│ │ ├── TabsView.vue
│ │ ├── SwitchView.vue
│ │ ├── TimelineView.vue
│ │ ├── NotificationView.vue
│ │ ├── CardView.vue
│ │ ├── InfiniteScrollView.vue
│ │ ├── BackToTopView.vue
│ │ ├── AccordionView.vue
│ │ ├── SidebarView.vue
│ │ ├── BreadcrumbsView.vue
│ │ ├── MasonryLayoutView.vue
│ │ ├── RatingView.vue
│ │ ├── DatePickerView.vue
│ │ └── AboutView.vue
│ ├── App.vue # 根组件
│ └── main.js # 应用入口
├── public/ # 公共资源目录
├── index.html # HTML 模板
├── package.json # 项目配置
├── vite.config.js # Vite 配置
└── node_modules/ # 依赖包目录

📘组件代码,src\components\DatePicker\DatePicker.vue

<script setup>
import { ref, computed, watch } from 'vue'// Props 定义
const props = defineProps({modelValue: {type: [Date, Array, null],default: null},minDate: {type: Date,default: null},maxDate: {type: Date,default: null},format: {type: String,default: 'YYYY-MM-DD'},disabled: {type: Boolean,default: false},placeholder: {type: String,default: '请选择日期'},firstDayOfWeek: {type: Number,default: 1},showWeekNumbers: {type: Boolean,default: false},isRange: {type: Boolean,default: false},locale: {type: [String, Object],default: 'zh-CN'},isInline: {type: Boolean,default: false},className: {type: String,default: ''},showConfirmButton: {type: Boolean,default: true},confirmText: {type: String,default: '确认'},disableDate: {type: Function,default: () => false}
})const emit = defineEmits(['update:modelValue', 'change', 'confirm', 'open', 'close', 'invalid'])// 初始化状态
const currentDate = ref(new Date())
const selectedDate = ref(props.isRange ? [] : null)
const isOpen = ref(props.isInline)// 格式化单个日期
const formatSingleDate = (date) => {if (!(date instanceof Date) || isNaN(date.getTime())) return ''const year = date.getFullYear()const month = String(date.getMonth() + 1).padStart(2, '0')const day = String(date.getDate()).padStart(2, '0')return props.format.replace('YYYY', year).replace('MM', month).replace('DD', day)
}// 格式化显示日期
const formattedDate = computed(() => {if (!selectedDate.value) return ''if (Array.isArray(selectedDate.value)) {return selectedDate.value.map(date => date instanceof Date ? formatSingleDate(date) : '').filter(Boolean).join(' - ')}return formatSingleDate(selectedDate.value)
})// 日历数据
const calendarDays = computed(() => {const year = currentDate.value.getFullYear()const month = currentDate.value.getMonth()const firstDay = new Date(year, month, 1)const lastDay = new Date(year, month + 1, 0)const days = []const firstDayOfWeek = firstDay.getDay()const prevMonthDays = (firstDayOfWeek - props.firstDayOfWeek + 7) % 7// 上月日期for (let i = prevMonthDays; i > 0; i--) {const date = new Date(year, month, 1 - i)days.push({date,isCurrentMonth: false,isDisabled: isDateDisabled(date)})}// 当月日期for (let i = 1; i <= lastDay.getDate(); i++) {const date = new Date(year, month, i)days.push({date,isCurrentMonth: true,isDisabled: isDateDisabled(date)})}// 下月日期const remainingDays = 42 - days.lengthfor (let i = 1; i <= remainingDays; i++) {const date = new Date(year, month + 1, i)days.push({date,isCurrentMonth: false,isDisabled: isDateDisabled(date)})}return days
})// 星期标题
const weekDays = computed(() => {const days = ['日', '一', '二', '三', '四', '五', '六']return [...days.slice(props.firstDayOfWeek), ...days.slice(0, props.firstDayOfWeek)]
})// 判断日期是否禁用
const isDateDisabled = (date) => {if (!(date instanceof Date)) return trueif (props.minDate && date < props.minDate) return trueif (props.maxDate && date > props.maxDate) return truereturn props.disableDate(date)
}// 选择日期
const selectDate = (day) => {if (!day.date || day.isDisabled) {emit('invalid', { reason: 'date disabled' })return}const newDate = new Date(day.date)if (props.isRange) {if (!Array.isArray(selectedDate.value)) {selectedDate.value = []}if (selectedDate.value.length === 0 || selectedDate.value.length === 2) {selectedDate.value = [newDate]} else {selectedDate.value = [selectedDate.value[0], newDate].sort((a, b) => a - b)}} else {selectedDate.value = newDate}emit('update:modelValue', selectedDate.value)emit('change', { value: selectedDate.value, isValid: true })
}// 切换月份
const changeMonth = (delta) => {currentDate.value = new Date(currentDate.value.getFullYear(),currentDate.value.getMonth() + delta,1)
}// 确认选择
const confirm = () => {emit('confirm', selectedDate.value)isOpen.value = falseemit('close')
}// 切换日历显示
const toggleCalendar = () => {if (props.disabled) returnisOpen.value = !isOpen.valueemit(isOpen.value ? 'open' : 'close')
}// 监听数据变化
watch(() => props.modelValue, (newVal) => {if (props.isRange) {selectedDate.value = Array.isArray(newVal) ? newVal.map(d => d instanceof Date ? new Date(d) : null): []} else {selectedDate.value = newVal instanceof Date ? new Date(newVal) : null}
}, { immediate: true })
</script><template><div :class="['date-picker', className]"><inputtype="text":placeholder="placeholder":value="formattedDate"@click="toggleCalendar"readonly:disabled="disabled"/><div v-if="isOpen || isInline" class="calendar"><div class="calendar-header"><button @click="changeMonth(-1)">&lt;</button><span>{{ currentDate.getFullYear() }}年 {{ currentDate.getMonth() + 1 }}月</span><button @click="changeMonth(1)">&gt;</button></div><div class="calendar-weeks"><div v-for="day in weekDays" :key="day" class="week-day">{{ day }}</div></div><div class="calendar-days"><divv-for="day in calendarDays":key="day.date.getTime()":class="['calendar-day',{'is-current-month': day.isCurrentMonth,'is-disabled': day.isDisabled,'is-selected': selectedDate && (Array.isArray(selectedDate) ? selectedDate.some(d => d && d.getTime() === day.date.getTime()): selectedDate.getTime() === day.date.getTime())}]"@click="selectDate(day)">{{ day.date.getDate() }}</div></div><div v-if="showConfirmButton" class="calendar-footer"><button @click="confirm">{{ confirmText }}</button></div></div></div>
</template><style scoped>
.date-picker {display: inline-block;position: relative;
}input {padding: 8px;border: 1px solid #dcdfe6;border-radius: 4px;width: 200px;cursor: pointer;
}.calendar {position: absolute;top: 100%;left: 0;margin-top: 5px;background: white;border: 1px solid #dcdfe6;border-radius: 4px;box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);z-index: 1000;
}.calendar-header {display: flex;justify-content: space-between;align-items: center;padding: 8px;border-bottom: 1px solid #ebeef5;
}.calendar-weeks {display: grid;grid-template-columns: repeat(7, 1fr);text-align: center;border-bottom: 1px solid #ebeef5;
}.week-day {padding: 8px;color: #606266;
}.calendar-days {display: grid;grid-template-columns: repeat(7, 1fr);gap: 2px;padding: 8px;
}.calendar-day {padding: 8px;text-align: center;cursor: pointer;color: #606266;
}.calendar-day:hover:not(.is-disabled) {background-color: #f5f7fa;
}.is-current-month {color: #303133;
}.is-selected {background-color: #409eff;color: white;
}.is-disabled {color: #c0c4cc;cursor: not-allowed;background-color: #f5f7fa;
}.calendar-footer {padding: 8px;text-align: right;border-top: 1px solid #ebeef5;
}button {padding: 6px 12px;background: #409eff;border: none;border-radius: 4px;color: white;cursor: pointer;
}button:hover {background: #66b1ff;
}.is-inline {position: static;margin-top: 0;
}
</style>

📘调用 src\views\DatePickerView.vue

<script setup>
import { ref } from 'vue'
import DatePicker from '../components/DatePicker/DatePicker.vue'// 初始化状态
const basicDate = ref(null)
const rangeDate = ref(null)
const disabledDate = ref(null)
const customDate = ref(null)
const inlineDate = ref(null)
const limitedDate = ref(null)// 日期范围
const minDate = new Date('2024-01-01')
const maxDate = new Date('2024-12-31')// 格式化函数
const formatDate = (date) => {if (!date) return '未选择'if (Array.isArray(date)) {if (!date.length) return '未选择'return date.map(d => {if (!d) return ''return d instanceof Date ? d.toLocaleDateString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit'}) : ''}).filter(Boolean).join(' - ')}return date instanceof Date ? date.toLocaleDateString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit'}) : '未选择'
}// 禁用周末
const isWeekend = (date) => {if (!(date instanceof Date)) return falseconst day = date.getDay()return day === 0 || day === 6
}// 事件处理
const handleChange = ({ value, isValid }) => {console.log('日期变化:', formatDate(value), '是否有效:', isValid)
}const handleConfirm = (date) => {alert(`确认选择:${formatDate(date)}`)
}
</script><template><div class="datepicker-demo"><!-- 基础示例 --><section class="demo-block"><h3>基础用法</h3><DatePickerv-model="basicDate"placeholder="请选择日期"@change="handleChange"/><div class="demo-value">选中值: {{ formatDate(basicDate) }}</div></section><!-- 日期范围选择 --><section class="demo-block"><h3>日期范围</h3><DatePickerv-model="rangeDate":is-range="true"placeholder="请选择日期范围"@change="handleChange"/><div class="demo-value">选中值: {{ formatDate(rangeDate) }}</div></section><!-- 禁用周末 --><section class="demo-block"><h3>禁用周末</h3><DatePickerv-model="disabledDate":disable-date="isWeekend"placeholder="请选择工作日"@change="handleChange"/><div class="demo-value">选中值: {{ formatDate(disabledDate) }}</div></section><!-- 自定义格式 --><section class="demo-block"><h3>自定义格式</h3><DatePickerv-model="customDate"format="MM/DD/YYYY"placeholder="月/日/年"@change="handleChange"/><div class="demo-value">选中值: {{ formatDate(customDate) }}</div></section><!-- 设置日期范围 --><section class="demo-block" style=""><h3>限制可选日期范围</h3><DatePickerv-model="limitedDate":min-date="minDate":max-date="maxDate"placeholder="选择2024年日期"@change="handleChange"@confirm="handleConfirm"/><div class="demo-value">选中值: {{ formatDate(limitedDate) }}</div></section><!-- 内联显示 --><section class="demo-block1"><h3>内联显示</h3><DatePickerv-model="inlineDate":is-inline="true"@change="handleChange"/><div class="demo-value">选中值: {{ formatDate(inlineDate) }}</div></section></div>
</template><style scoped>
.datepicker-demo {padding: 20px;max-width: 800px;margin: 0 auto;
}.demo-block {margin-bottom: 30px;padding: 20px;border: 1px solid #ebeef5;border-radius: 4px;background-color: #fff;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}.demo-block1{margin-top: 300px;
}
h3 {margin-bottom: 15px;font-size: 18px;color: #333;font-weight: 500;
}.demo-value {margin-top: 10px;padding: 10px;background: #f5f7fa;border-radius: 4px;font-size: 14px;color: #666;border: 1px solid #e4e7ed;
}
</style>

📚代码测试

正常

📚测试代码正常跑通,附其他基本代码

  • 添加路由
  • 页面展示入口

📘编写路由 src\router\index.js

\router\index.js

import { createRouter, createWebHistory } from 'vue-router'const router = createRouter({history: createWebHistory(import.meta.env.BASE_URL),routes: [{path: '/',name: 'progress',component:  () => import('../views/ProgressView.vue'),},{path: '/tabs',name: 'tabs',// route level code-splitting// this generates a separate chunk (About.[hash].js) for this route// which is lazy-loaded when the route is visited.// 标签页(Tabs)component: () => import('../views/TabsView.vue'),},{path: '/accordion',name: 'accordion',// 折叠面板(Accordion)component: () => import('../views/AccordionView.vue'),},{path: '/timeline',name: 'timeline',// 时间线(Timeline)component: () => import('../views/TimelineView.vue'),},{path: '/backToTop',name: 'backToTop',component: () => import('../views/BackToTopView.vue')},{path: '/notification',name: 'notification',component: () => import('../views/NotificationView.vue')},{path: '/card',name: 'card',component: () => import('../views/CardView.vue')},{path: '/infiniteScroll',name: 'infiniteScroll',component: () => import('../views/InfiniteScrollView.vue')},{path: '/switch',name: 'switch',component: () => import('../views/SwitchView.vue')},{path: '/sidebar',name: 'sidebar',component: () => import('../views/SidebarView.vue')},{path: '/breadcrumbs',name: 'breadcrumbs',component: () => import('../views/BreadcrumbsView.vue')},{path: '/masonryLayout',name: 'masonryLayout',component: () => import('../views/masonryLayoutView.vue')},{path: '/rating',name: 'rating',component: () => import('../views/RatingView.vue')},{path: '/datePicker',name: 'datePicker',component: () => import('../views/DatePickerView.vue')}],
})export default router

📘编写展示入口 src\App.vue

 src\App.vue

<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script><template><header><img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" /><div class="wrapper"><HelloWorld msg="You did it!" /><nav><RouterLink to="/">Progress</RouterLink><RouterLink to="/tabs">Tabs</RouterLink><RouterLink to="/accordion">Accordion</RouterLink><RouterLink to="/timeline">Timeline</RouterLink><RouterLink to="/backToTop">BackToTop</RouterLink><RouterLink to="/notification">Notification</RouterLink><RouterLink to="/card">Card</RouterLink><RouterLink to="/infiniteScroll">InfiniteScroll</RouterLink><RouterLink to="/switch">Switch</RouterLink><RouterLink to="/sidebar">Sidebar</RouterLink><RouterLink to="/breadcrumbs">Breadcrumbs</RouterLink><RouterLink to="/masonryLayout">MasonryLayout</RouterLink><RouterLink to="/rating">Rating</RouterLink><RouterLink to="/datePicker">DatePicker</RouterLink></nav></div></header><RouterView />
</template><style scoped>
header {line-height: 1.5;max-height: 100vh;
}.logo {display: block;margin: 0 auto 2rem;
}nav {width: 100%;font-size: 12px;text-align: center;margin-top: 2rem;
}nav a.router-link-exact-active {color: var(--color-text);
}nav a.router-link-exact-active:hover {background-color: transparent;
}nav a {display: inline-block;padding: 0 1rem;border-left: 1px solid var(--color-border);
}nav a:first-of-type {border: 0;
}@media (min-width: 1024px) {header {display: flex;place-items: center;padding-right: calc(var(--section-gap) / 2);}.logo {margin: 0 2rem 0 0;}header .wrapper {display: flex;place-items: flex-start;flex-wrap: wrap;}nav {text-align: left;margin-left: -1rem;font-size: 1rem;padding: 1rem 0;margin-top: 1rem;}
}
</style>

📚页面效果

页面效果

📚自己部署 DeepSeek 安装地址

蓝耘元生代智算云平台地址:https://cloud.lanyun.net/#/registerPage?promoterCode=07100c37a0

📚相关文章

 

———— 相 关 文 章 ————

 

  1. 0基础3步部署自己的DeepSeek安装步骤

  2. DeepSeek 助力 Vue 开发:打造丝滑的步骤条(Step bar)

  3. DeepSeek 助力 Vue 开发:打造丝滑的进度条(Progress Bar)

  4. 自己部署 DeepSeek 助力 Vue 开发:打造丝滑的标签页(Tabs)

  5. 自己部署 DeepSeek 助力 Vue 开发:打造丝滑的折叠面板(Accordion)

  6. 自己部署 DeepSeek 助力 Vue 开发:打造丝滑的时间线(Timeline )

  7. DeepSeek 助力 Vue 开发:打造丝滑的返回顶部按钮(Back to Top)

  8. DeepSeek 助力 Vue 开发:打造丝滑的通知栏(Notification Bar)

  9. DeepSeek 助力 Vue 开发:打造丝滑的卡片(Card)

  10. DeepSeek 助力 Vue 开发:打造丝滑的无限滚动(Infinite Scroll)

  11. DeepSeek 助力 Vue 开发:打造丝滑的开关切换(Switch)

  12. DeepSeek 助力 Vue 开发:打造丝滑的侧边栏(Sidebar)

  13. DeepSeek 助力 Vue 开发:打造丝滑的面包屑导航(Breadcrumbs)

  14. DeepSeek 助力 Vue 开发:打造丝滑的瀑布流布局(Masonry Layout)

  15. DeepSeek 助力 Vue 开发:打造丝滑的评分组件(Rating)

到此这篇文章就介绍到这了,更多精彩内容请关注本人以前的文章或继续浏览下面的文章,创作不易,如果能帮助到大家,希望大家多多支持宝码香车~💕,若转载本文,一定注明本文链接。


整理不易,点赞关注宝码香车

更多专栏订阅推荐:
👍 html+css+js 绚丽效果
💕 vue
✈️ Electron
⭐️ js
📝 字符串
✍️ 时间对象(Date())操作

相关文章:

DeepSeek 助力 Vue 开发:打造丝滑的日期选择器(Date Picker),未使用第三方插件

前言&#xff1a;哈喽&#xff0c;大家好&#xff0c;今天给大家分享一篇文章&#xff01;并提供具体代码帮助大家深入理解&#xff0c;彻底掌握&#xff01;创作不易&#xff0c;如果能帮助到大家或者给大家一些灵感和启发&#xff0c;欢迎收藏关注哦 &#x1f495; 目录 Deep…...

kubernetes源码分析 kubelet

简介 从官方的架构图中很容易就能找到 kubelet 执行 kubelet -h 看到 kubelet 的功能介绍&#xff1a; kubelet 是每个 Node 节点上都运行的主要“节点代理”。使用如下的一个向 apiserver 注册 Node 节点&#xff1a;主机的 hostname&#xff1b;覆盖 host 的参数&#xff1…...

PostgreSQL的学习心得和知识总结(一百六十八)|深入理解PostgreSQL数据库之PostgreSQL 规划器开发与调试(翻译)

目录结构 注&#xff1a;提前言明 本文借鉴了以下博主、书籍或网站的内容&#xff0c;其列表如下&#xff1a; 1、参考书籍&#xff1a;《PostgreSQL数据库内核分析》 2、参考书籍&#xff1a;《数据库事务处理的艺术&#xff1a;事务管理与并发控制》 3、PostgreSQL数据库仓库…...

React创建项目实用教程

✍请将整篇文章阅读完再开始使用create-react-app react-project创建项目 检查node版本 node -v // node版本&#xff1a;v22.10.0使用nvm降版本修改到了node V20.11.1之后再进行一系列操作的 react脚手架安装&#xff1a; npm install -g create-react-app// node版本&…...

STM32 外部中断和NVIC嵌套中断向量控制器

目录 背景 外部中断/事件控制器(EXTI) 主要特性 功能说明 外部中断线 嵌套向量中断控制器 特性 ‌中断线&#xff08;Interrupt Line&#xff09; 中断线的定义和作用 STM32中断线的分类和数量 优先级分组 抢占优先级&#xff08;Preemption Priority&#xff09; …...

讯飞唤醒+VOSK语音识别+DEEPSEEK大模型+讯飞离线合成实现纯离线大模型智能语音问答。

在信息爆炸的时代&#xff0c;智能语音问答系统正以前所未有的速度融入我们的日常生活。然而&#xff0c;随着数据泄露事件的频发&#xff0c;用户对于隐私保护的需求日益增强。想象一下&#xff0c;一个无需联网、即可响应你所有问题的智能助手——这就是纯离线大模型智能语音…...

【MediaTek】 T750 openwrt-23.05编 cannot find dependency libexpat for libmesode

MediaTek T750 T750 采用先进的 7nm 制程,高度集成 5G 调制解调器和四核 Arm CPU,提供较强的功能和配置,设备制造商得以打造精巧的高性能 CPE 产品,如固定无线接入(FWA)路由器和移动热点。 MediaTek T750 平台是一款综合的芯片组,集成了 5G SoC MT6890、12nm 制程…...

如何通过 prometheus-operator 实现服务发现

在之前的章节中,我们讲解了如何编写一个自定义的 Exporter,以便将指标暴露给 Prometheus 进行抓取。现在,我们将进一步扩展这个内容,介绍如何使用 prometheus-operator 在 Kubernetes 集群中自动发现并监控这些暴露的指标。 部署应用 在 Kubernetes 集群中部署我们的自定…...

VBA学习:将文本中的\n替换为换行符

目录 一、问题描述 二、解决方法 三、代码 四、注意事项 五、总结 一、问题描述 一个字符串&#xff0c;包含多个\n&#xff0c;现在利用VBA写一段程序&#xff0c;把\n替换为换行符。 二、解决方法 1、Replace函数&#xff1a;直接替换换行符 在Word 中 使用vbCrLf或者…...

(8/100)每日小游戏平台系列

项目地址位于&#xff1a;小游戏导航 新增一个打地鼠游戏&#xff01; 打地鼠&#xff08;Whack-a-Mole&#xff09;是一款经典的休闲游戏&#xff0c;玩家需要点击随机出现的地鼠&#xff0c;以获取分数。游戏时间有限&#xff0c;玩家需要在规定时间内尽可能多地击中地鼠&am…...

【设计模式】 建造者模式和原型模式

建造者模式&#xff08;Builder Pattern&#xff09; 概述 建造者模式是一种创建型设计模式&#xff0c;它允许逐步构建复杂对象。通过将构造过程与表示分离&#xff0c;使得同样的构建过程可以创建不同的表示。这种模式非常适合用于创建那些具有很多属性的对象&#xff0c;尤…...

【Python 学习 / 4】基本数据结构之 字符串 与 集合

文章目录 1. 字符串概念1.1 字符串的创建1.2 字符串的访问和操作1.2.1 下标访问1.2.2 切片操作1.2.3 字符串的拼接和重复1.2.4 字符串的长度 1.3 字符串的方法1.4 字符串的查找和替换1.5 字符串格式化1.5.1 使用 % 运算符1.5.2 使用 str.format()1.5.3 使用 f-string&#xff0…...

Spring框架中都用到了哪些设计模式?

大家好&#xff0c;我是锋哥。今天分享关于【Spring框架中都用到了哪些设计模式&#xff1f;】面试题。希望对大家有帮助&#xff1b; Spring框架中都用到了哪些设计模式&#xff1f; 1000道 互联网大厂Java工程师 精选面试题-Java资源分享网 Spring框架中使用了大量的设计模…...

HBuilderX中uni-app打开页面时,如何用URL传递参数,Query参数传递

HBuilderX中uni-app打开页面时&#xff0c;如何用URL传递参数,Query参数传递&#xff1f; URL是一种描述文件在计算机网络中位置的方式。在web开发中&#xff0c;可以通过query string来传递参数。使用uniapp进行开发&#xff0c;打开不同的页面时&#xff0c;本文介绍给所要打…...

【开源向量数据库】Milvus简介

Milvus 是一个开源、高性能、可扩展的向量数据库&#xff0c;专门用于存储和检索高维向量数据。它支持近似最近邻搜索&#xff08;ANN&#xff09;&#xff0c;适用于图像检索、自然语言处理&#xff08;NLP&#xff09;、推荐系统、异常检测等 AI 应用场景。 官网&#xff1a…...

c/c++蓝桥杯经典编程题100道(19)汉诺塔问题

汉诺塔问题 ->返回c/c蓝桥杯经典编程题100道-目录 目录 汉诺塔问题 一、题型解释 二、例题问题描述 三、C语言实现 解法1&#xff1a;递归法&#xff08;难度★&#xff09; 解法2&#xff1a;迭代法&#xff08;难度★★★&#xff09; 四、C实现 解法1&#xff1…...

CSS盒模

CSS盒模型就像一个快递包裹&#xff0c;网页上的每个元素都可以看成是这样一个包裹&#xff0c;它主要由以下几个部分组成&#xff1a; 内容&#xff08;content&#xff09;&#xff1a;就像包裹里真正装的东西&#xff0c;比如文字、图片等。在CSS里&#xff0c;可用width&a…...

【go语言规范】关于接口设计

抽象应该被发现&#xff0c;而不是被创造。为了避免不必要的复杂性&#xff0c;需要时才创建接口&#xff0c;而不是预见到需要它&#xff0c;或者至少可以证明这种抽象是有价值的。 “The bigger the interface, the weaker the abstraction. 不要用接口进行设计&#xff0c;要…...

计算机视觉+Numpy和OpenCV入门

Day 1&#xff1a;Python基础Numpy和OpenCV入门 Python基础 变量与数据类型、函数与类的定义、列表与字典操作文件读写操作&#xff08;读写图像和数据文件&#xff09; 练习任务&#xff1a;写一个Python脚本&#xff0c;读取一个图像并保存灰度图像。 import cv2 img cv2.im…...

计算机网络之网络层(网络层的功能,异构网络互联,路由与转发,SDN基本概念,拥塞控制)

计算机网络之网络层 网络层&#xff08;Network Layer&#xff09;是计算机网络体系结构中至关重要的一层&#xff0c;它位于数据链路层&#xff08;Data Link Layer&#xff09;和传输层&#xff08;Transport Layer&#xff09;之间&#xff0c;主要负责数据包从源主机到目的…...

利用雪花算法+Redis 自增 ID,生成订单号

在我们的项目中&#xff0c;我们需要定义一些全局唯一的 ID&#xff0c;比如订单号&#xff0c;支付单号等等。 这些ID有以下几个基本要求&#xff1a; 1、不能重复 2、不可被预测 3、能适应分库分表 为了生成一个这样一个全局的订单号&#xff0c;自定义了一个分布式 ID …...

第35次CCF计算机软件能力认证 python 参考代码

题目列表1. 密码2. 字符串变换3. 补丁应用4. 通讯延迟5. 木板切割题目列表 第35次CCF计算机软件能力认证 1. 密码 n = int(input()) for _ in range(n):s =...

【探商宝】:大数据与AI赋能,助力中小企业精准拓客引

引言&#xff1a;在数据洪流中&#xff0c;如何精准锁定商机&#xff1f; 在竞争激烈的商业环境中&#xff0c;中小企业如何从海量信息中快速筛选出高价值客户&#xff1f;如何避免无效沟通&#xff0c;精准触达目标企业&#xff1f; 探商宝——一款基于大数据与AI技术的企业信…...

npm 私服使用介绍

一、导读 本文主要介绍 npm 私服的使用&#xff0c;至于 npm 私服搭建的过程&#xff0c;可以看本人之前的文章《Docker 部署 verdaccio 搭建 npm 私服》 二、前置条件 npm私服地址&#xff1a;http://xxx.xxx.xxx.xxx:port/ 三、本地 npm 源切换 使用nrm&#xff0c;可以方…...

【Python 打造高效文件分类工具】

【Python】 打造高效文件分类工具 一、代码整体结构二、关键代码解析&#xff08;一&#xff09;初始化部分&#xff08;二&#xff09;界面创建部分&#xff08;三&#xff09;核心功能部分&#xff08;四&#xff09;其他辅助功能部分 三、运行与使用四、示图五、作者有话说 …...

水务+AI应用探索(一)| FastGPT+DeepSeek 本地部署

在当下的科技浪潮中&#xff0c;AI 无疑是最炙手可热的焦点之一&#xff0c;其强大的能力催生出了丰富多样的应用场景&#xff0c;广泛渗透到各个行业领域。对于水务行业而言&#xff0c;AI 的潜力同样不可估量。为了深入探究 AI 在水务领域的实际应用成效&#xff0c;切实掌握…...

基于若依开发的工程项目管理系统开源免费,用于工程项目投标、进度及成本管理的OA 办公开源系统,非常出色!

一、简介 今天给大家推荐一个基于 RuoYi-Flowable-Plus 框架二次开发的开源工程项目管理系统&#xff0c;专为工程项目的投标管理、项目进度控制、成本管理以及 OA 办公需求设计。 该项目结合了 Spring Boot、Mybatis、Vue 和 ElementUI 等技术栈&#xff0c;提供了丰富的功能…...

最新Apache Hudi 1.0.1源码编译详细教程以及常见问题处理

1.最新Apache Hudi 1.0.1源码编译 2.Flink、Spark、Hive集成Hudi 1.0.1 3.flink streaming写入hudi 目录 1. 版本介绍 2. 安装maven 2.1. 下载maven 2.2. 设置环境变量 2.3. 添加Maven镜像 3. 编译hudi 3.1. 下载hudi源码 3.2. 修改hudi源码 3.3. 修改hudi-1.0.1/po…...

设计模式-工厂模式

设计模式 - 工厂模式 工厂模式&#xff08;Factory Pattern&#xff09;是一种创建型设计模式&#xff0c;它通过定义一个用于创建对象的接口&#xff0c;让子类决定实例化哪一个类&#xff0c;从而使得一个类的实例化延迟到子类。工厂模式通过将对象创建的逻辑抽象化&#xf…...

基于opencv的HOG+角点匹配教程

1. 引言 在计算机视觉任务中&#xff0c;特征匹配是目标识别、图像配准和物体跟踪的重要组成部分。本文介绍如何使用 HOG&#xff08;Histogram of Oriented Gradients&#xff0c;方向梯度直方图&#xff09; 和 角点检测&#xff08;Corner Detection&#xff09; 进行特征匹…...

《深度学习》——调整学习率和保存使用最优模型

调整学习率 在使用 PyTorch 进行深度学习训练时&#xff0c;调整学习率是一个重要的技巧&#xff0c;合适的学习率调整策略可以帮助模型更好地收敛。 PyTorch 提供了多种调整学习率的方法&#xff0c;下面将详细介绍几种常见的学习率调整策略及实例代码&#xff1a; torch.opt…...

Ubuntu22.04配置cuda/cudnn/pytorch

Ubuntu22.04配置cuda/cudnn/pytorch 安装cuda官网下载.run文件并且安装/etc/profile中配置cuda环境变量 cudnn安装官网找cuda版本对应的cudnn版本下载复制相应文件到系统文件中 安装pytorch官网找cuda对应版本的pytorchpython代码测试pytorch-GPU版本安装情况 安装cuda 官网下…...

通俗理解-L、-rpath和-rpath-link编译链接动态库

一、参考资料 链接选项 rpath 的应用和原理 | BewareMyPower的博客 使用 rpath 和 rpath-link 确保 samba-util 库正确链接-CSDN博客 编译参数-Wl和rpath的理解_-wl,-rpath-CSDN博客 Using LD, the GNU linker - Options Directory Options (Using the GNU Compiler Colle…...

【Golang】GC探秘/写屏障是什么?

之前写了 一篇【Golang】内存管理 &#xff0c;有了很多的阅读量&#xff0c;那么我就接着分享一下Golang的GC相关的学习。 由于Golang的GC机制一直在持续迭代&#xff0c;本文叙述的主要是Go1.9版本及以后的GC机制&#xff0c;该版本中Golang引入了 混合写屏障大幅度地优化了S…...

Linux(Centos 7.6)命令详解:head

1.命令作用 将每个文件的前10行打印到标准输出(Print the first 10 lines of each FILE to standard output) 2.命令语法 Usage: head [OPTION]... [FILE]... 3.参数详解 OPTION: -c, --bytes[-]K&#xff0c;打印每个文件的前K字节-n, --lines[-]&#xff0c;打印前K行而…...

【工具变量】上市公司网络安全治理数据(2007-2023年)

网络安全是国家安全体系的重要组成部分&#xff0c;是确保金融体系稳定运行、维护市场信心的关键。网络安全治理是指通过一系列手段和措施&#xff0c;维护网络安全&#xff0c;保护网络环境的稳定和安全&#xff0c;旨在确保公司网络系统免受未经授权的访问、攻击和破坏&#…...

watermark解释

在 Apache Flink 中&#xff0c;Watermark 是处理事件时间&#xff08;Event Time&#xff09;的核心机制&#xff0c;用于解决流处理中因数据乱序或延迟到达而导致的窗口计算不准确问题。理解 Watermark 的关键在于以下几点&#xff1a; 1. 事件时间 vs. 处理时间 事件时间&…...

Transformer 模型介绍(四)——编码器 Encoder 和解码器 Decoder

上篇中讲完了自注意力机制 Self-Attention 和多头注意力机制 Multi-Head Attention&#xff0c;这是 Transformer 核心组成部分之一&#xff0c;在此基础上&#xff0c;进一步展开讲一下编码器-解码器结构&#xff08;Encoder-Decoder Architecture&#xff09; Transformer 模…...

Linux安装Minio

1、下载rpm包 2、rpm 安装 rpm -ivh xx.rpm3、通过查看minion状态&#xff0c;查看其配置文件位置 systemctl start minio可以根据情况自定义修改配置文件内容&#xff0c;这里暂时不做修改 4、创建数据文件和日志文件&#xff0c;一般在/usr/local/ 5、编写启动脚本 #!/bi…...

JAVA EE初阶 - 预备知识(三)

一、中间件 中间件是一种处于操作系统和应用程序之间的软件&#xff0c;它能够为分布式应用提供交互、资源共享、数据处理等功能&#xff0c;是现代软件架构中不可或缺的一部分。下面从多个方面为你详细介绍中间件&#xff1a; 定义与作用 定义&#xff1a;中间件是连接两个或…...

百度热力图数据获取,原理,处理及论文应用6

目录 0、数据简介0、示例数据1、百度热力图数据日期如何选择1.1、其他实验数据的时间1.2、看日历1.3、看天气 2、百度热力图几天够研究&#xff1f;部分文章统计3、数据原理3.1.1 ** 这个比较重要&#xff0c;后面还会再次出现。核密度的值怎么理解&#xff1f;**3.1.2 Csv->…...

tcp连接的11种状态及常见问题。

tcp链接整体流程&#xff0c;如下图所示&#xff1a; TCP协议在连接的建立和终止过程中涉及11种状态&#xff0c;这些状态反映了连接的不同阶段。以下是每种状态的详细说明&#xff1a; 1. CLOSED 初始状态&#xff0c;表示没有活动的连接或连接已完全关闭。当应用程序关闭连…...

宝塔面板开始ssl后,使用域名访问不了后台管理

宝塔面板后台开启ssl访问后&#xff0c;用的证书是其他第三方颁发的证书 再使用 域名/xxx 的形式&#xff1a;https://域名:xxx/xxx 访问后台&#xff0c;结果出现如下&#xff0c;不管使用 http 还是 https 的路径访问都进不后台管理 这个时候可以使用 https://ip/xxx 的方式来…...

5.日常英语笔记

sprouted tater 发芽的土豆 fluid 液体&#xff0c;流体 The doctor recommended drinking plenty of fluids 医生建议多喝流质 适应新环境 adapt to the new environment adjust to the new surroundings get used to the new setting accommodate oneself to the new circu…...

利用工业相机及多光谱图像技术助力医疗美容皮肤AI检测方案

随着年轻人对皮肤的管理要求越来越高&#xff0c;“科技护肤”已成为线下医疗美业护肤行业转型升级之趋势。如何利用先进的图像识别技术和AI大数据分析&#xff0c;为医生和消费者提供个性化的皮肤诊断分析和护肤建议&#xff0c;利用工业相机及多光谱成像技术完美实现这一可能…...

qt QOpenGLTexture详解

1. 概述 QOpenGLTexture 是 Qt5 提供的一个类&#xff0c;用于表示和管理 OpenGL 纹理。它封装了 OpenGL 纹理的创建、分配存储、绑定和设置像素数据等操作&#xff0c;简化了 OpenGL 纹理的使用。 2. 重要函数 构造函数&#xff1a; QOpenGLTexture(const QImage &image,…...

【Zookeeper如何实现分布式锁?】

Zookeeper如何实现分布式锁? 一、ZooKeeper分布式锁的实现原理二、ZooKeeper分布式锁的实现流程三、示例代码四、总结一、ZooKeeper分布式锁的实现原理 ZooKeeper是一个开源的分布式协调服务,它提供了一个分布式文件系统的接口,可以用来存储和管理分布式系统的配置信息。 …...

mysql 学习16 视图,存储过程,存储函数,触发器

视图&#xff0c; 存储过程&#xff0c; 存储函数 触发器...

(前端基础)HTML(一)

前提 W3C:World Wide Web Consortium&#xff08;万维网联盟&#xff09; Web技术领域最权威和具有影响力的国际中立性技术标准机构 其中标准包括&#xff1a;机构化标准语言&#xff08;HTML、XML&#xff09; 表现标准语言&#xff08;CSS&#xff09; 行为标准&#xf…...

go设置镜像代理

前言 在 Go 开发中&#xff0c;如果直接从官方源&#xff08;https://proxy.golang.org&#xff09;下载依赖包速度较慢&#xff0c;可以通过设置 镜像代理 来加速依赖包的下载。以下是增加 Go 镜像代理的详细方法&#xff1a; 一、设置 Go 镜像代理 1. 使用环境变量设置代理…...