简单聊一聊vue日历插件vue-full-calendar

vue使用FullCalendar插件实现日历会议预约功能 此案例是用FullCalendar插件做一个会议日程预约功能,此功能可查看自己的日程安排会议信息等...... 阅读详情

版本选择

目前大约有三种不同版本的引用方式,本篇文章讲的是第一种,如果下文中讲的方法不生效,请检查一下版本是否一致

  1. vue-full-calendar
  2. vue-fullcalendar
  3. fullcalendar/vue

安装

npm install --save vue-full-calendar

引用–局部引用

// index.vue
import { FullCalendar } from 'vue-full-calendar'
import 'fullcalendar/dist/fullcalendar.css'
export default {
  components: {
    FullCalendar,
  },
}

fullcalendar依赖于jQ,官方说无需手动安装jQ,如果未检测到jQ,fullcalendar将自动安装。不知道是因为我的脚手架版本太低还是怎样,我项目没有自动安装jQ,需要进行手动安装

*报以下错误就是没有自动安装JQ导致,按照提示执行npm install --save jquery moment即可
These dependencies were not found:

* jquery in ./node_modules/fullcalendar/dist/fullcalendar.js, ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/vue-full-calendar/components/FullCalendar.vue
* moment in ./node_modules/fullcalendar/dist/fullcalendar.js

To install them, you can run: npm install --save jquery moment

配置

视图

执行完以上步骤,看看项目是不是已经可以运行了,不会意外会得到以下界面,接下来进行配置

<template>
 <full-calendar:config="config" />
</template>

<script>
export default {
    data() {
    return {
        config: {
             //在日历顶部定义按钮和标题
             //title 、prev、next、prevYear、nextYear、today、month、basicWeek、basicDay
             header: {
                left:'title',
                center: '',
                right:  'today prev,next month'
            },
            
            // 自定义按钮文字
             buttonText: {
                month: '月',
                today:'今天'
            },
            defaultDate: '2020-04-01', // 默认时间
            
            //日历切换时间范围
            validRange: { 
                start: '2020-03-01',
                end: '2020-07-01'
            },
            locale: 'zh-cn', //中文
            allDaySlot: false, // 是否显示allDay
            defaultView: 'month', // 显示默认视图
            showNonCurrentDates: false, //是否在本月中显示其他月
            
            //事件
            eventMouseover: this.eventMouseover, // 事件悬停
            eventClick: this.eventClick, // 事件点击
            dayClick: this.dayClick // 天点击
         }
    }}
    }
}
</script>

点击查看更多视图配置

数据源

不出意外配置到这里fullcalendar就会变为下图,接下来开始配置数据源

 <full-calendar :events="events"/>





数据类型
  • 数组
events: [
    {
      title  : 'event1',
      start  : '2020-01-01'
    },
    {
      title  : 'event2',
      start  : '2020-01-05',
      end    : '2020-01-07'
    }
  ]
  • JSON
events: '/myfeed.php'
  • 函数 – axios请求

好多教程events使用时只接收了三个参数,导致实际callback没有接收到,这里当时卡了我好久,这里假如需要往其他组件传参,推荐使用bus,使用了bus别忘记卸载

 events: function(start, end, timezone, callback) {
        const year_month = `${start._d.getFullYear()}-${(start._d.getMonth() + 1).toString().padStart(2, '0')}`
        getDayList({ time: year_month }).then(res => {
            res.dayList.forEach((item, index) => {
             // 背景色 color: 'yellow', 
             // 文本色 textColor: 'black' 
                item.color = item.children.color
              })
              callback(res.dayList)
            })
          }
  • 多数据源
 <full-calendar :event-sources="eventSources/>
 eventSources: [
 events: [
    {
      title  : 'event1',
      start  : '2020-01-01'
    },
    {
      title  : 'event2',
      start  : '2020-01-05',
      end    : '2020-01-07'
    }
  ],
  events: '/myfeed.php',
  events: function(start, end, timezone, callback) {
        const year_month = `${start._d.getFullYear()}-${(start._d.getMonth() + 1).toString().padStart(2, '0')}`
        getDayList({ time: year_month }).then(res => {
            res.dayList.forEach((item, index) => {
                item.color = item.children.color 
              })
              callback(res.dayList)
            })
          }
    ],
  • 数据操作

有时候我们需要对数据进行操作,比如我现在遇到的需求是需要实现筛选,这里我们需要用到$refs进行操作

  <full-calendar ref="calendar" />
  this.$refs.calendar.fireMethod/$emit('','')
  1. 重新获取数据
this.$refs.calendar.$emit('refetch-events')
  1. 获取所有数据对象
this.$refs.calendar.fireMethod('getEventSources')
  1. 删除所有数据
this.$refs.calendar.fireMethod('removeEvents')
  1. 多数据源情况下,删除部分数据
this.$refs.calendar.fireMethod('removeEventSource', this.eventSources[0])
  1. 添加数据
this.$refs.calendar.fireMethod('addEventSource', 'data')

点击查看更多数据操作


自定义事件

有时候会有一些奇怪的需求,原生的不太好实现,这时候就需要去自定义事件

  • 切换日期
// next、prev、prevYear、nextYear
this.$refs.calendar.fireMethod('next')
  • 跳转指定日期
// month、basicWeek、basicDay...
this.$refs.calendar.fireMethod('changeView', 'basicDay', this.day)
  • 切换视图
// month、basicWeek、basicDay...
 this.$refs.calendar.fireMethod('changeView', 'month')

#### 结语

这篇教程是一个基本使用教程,后期会补充一些其他用法,本篇讲的知识点应该可以满足大部分需求,可以实现开篇图效果

农历可以看看 vue-lunar-full-calendar

FullCalendar 日历插件排班表排课表保姆级详解(可拖动排班排课) 闲来无事搞个排班排课表,之前貌似遇到过这类的需求,只不过没做上。主要用的就是FullCalendar插件。基于vue框架写法。基本的功能可以新建个日程看看样式,可以拖拽日程进去。提示:以下是本篇文章正文内容,下面案例可供参考以上就是实现简易排班排课表的雏形啦,复杂的功能还是要基于数据啦,静态只是看看大概。先说这么多,后面有坑我再写;以及后面看看能不能再加上些好玩的功能。 阅读详情

相关推荐

使用vue-lunar-full-calendar插件展示带有农历和节假日的日历

效果图: 使用npm命令安装插件,如下: npm install --save vue-lunar-full-calendar 在需要的页面引入插件,如下: import { LunarFullCalendar } from 'vue-lunar-full-calendar'; import tippy from "tippy.js"; //引入 tippy.js import 'tippy.js/dist/tippy.css';//引入 tippy.js import 'tippy.

小破孩的博客 8921

vue日历插件vue-full-calendar

解说:简单聊一聊vue日历插件vue-full-calendar - 掘金vue中如何使用vue-full-calendar(完整版)-优快云博客vue-full-calendar 用法详解 (vue 2.5.2的日历插件)-优快云博客管网:Demos | FullCalendar

killerdoubie的博客 1623

vue中使用FullCalendar日历插件

FullCalendar在vue中的应用

let us fly的博客 2661

vue FullCalendar使用案例及详解

先看下效果图 需求:实现预约功能,设置过不可预约的时间段置灰不可选中,比如上图中周六周天不可预约,晚上23:00到24:00不可预约;当前天在第一个,往后排7天;点击上一周下一周时切换数据重新渲染后台返回的数据;待审核已预约的数据后台返回根据状态展示不同的颜色;在FullCalendar中拖拽或者点击时填充开始时间结束时间,时长到右侧的表单中; 首先要安装完引用插件: import '@fullcalendar/core/vdom' // solves problem with Vite....

m0_51501174的博客 2万+

基于vue-lunar-full-calendar打造企业级农历节假日排班系统

本文详细介绍了如何利用vue-lunar-full-calendar插件快速构建符合中国企业需求的可视化排班系统。该系统原生支持农历日期显示与节假日自动标记,有效解决了传统排班工具在应对传统节日和法定假期时的痛点。文章从项目初始化、数据转换、事件可视化定制到前后端交互,提供了完整的实战指南,帮助企业提升排班管理效率和合规性。

weixin_29001423的博客 322

Vue2 - 使用Vue FullCalendar实现日历日程管理控件的案例详解(全)

在vue2项目开发中,使用FullCalendar控件实现日历日程管理

前端充电宝 2675

vue-full-calendar 用法详解 (vue 2.5.2的日历插件)

vue-full-calendar版本: "2.7.0"1.效果图2.上代码(1).安装依赖(2).文件中导入依赖(3).开发(3). 开始运行 1.效果图 具体demo,下方连接,下载即可运行。 fullcalendar_demo 零外还可以加入日程列表 2.上代码 需要创建一个vue脚手架,不会的可以百度下,这里就不说了,直接上主题。 (1).安装依赖 npm install vue-f...

weixin_44254243的博客 8742

C语言练习题:据说一个人的标准体重应该是其身高(单位:厘米)减去100、再乘以0.9所得到的公斤数。已知市斤的数值是公斤数值的两倍。现给定某人身高,请你计算其标准体重应该是多少?

题目内容: 据说一个人的标准体重应该是其身高(单位:厘米)减去100、再乘以0.9所得到的公斤数。已知市斤的数值是公斤数值的两倍。现给定某人身高,请你计算其标准体重应该是多少?(顺便也悄悄给自己算一下吧……) 输入格式: 输入第一行给出一个正整数H(100 < H ≤ 300),为某人身高。 输出格式: 在一行中输出对应的标准体重,单位为市斤,保留小数点后1位。 输入样例: 169 输出样例: 124.2 代码如下: #include<stdio.h> int main() { i

weixin_44877226的博客 2万+

vue-full-calendar 的使用

vue-full-calendar 的使用vue-full-calendar安装全局引入使用 vue-full-calendar vue-full-calendar是基于vue和calendar封装的日历插件,一般用于值班系统,考勤系统 安装 1、先npm uninstall jquery,日历插件包自带jQuery,不卸载掉的话会有问题 2、npm install vue-full-calendar 注意是vue-full-calendar,不是vue-fullcalendar 3、npm instal

sinat_38448493的博客 2178

保姆级教程:用PROGRAM_FTDI搞定Xilinx FPGA的JTAG调试器(基于FT232/FT2232/FT4232)

本文详细介绍了如何使用FT232/FT2232/FT4232系列芯片通过PROGRAM_FTDI工具配置Xilinx FPGA的JTAG调试器。从芯片选型、驱动安装到固件烧写和Vivado验证,提供了完整的实操指南和避坑要点,帮助开发者低成本实现高效调试。

weixin_29271053的博客 2170

Centos7.9使用kubeadm部署K8S集群

使用kubeadm部署一个k8s集群,单master+2worker节点。

lldhsds的专栏 1302

vue-full-calendar实现日历样式的记事本

经手的需求,有一个功能是以月为单位进行值班的安排与查询,具体如图,每一天都能点击显示员工列表进行操作,当天已经安排过的,值班信息显示在日历上vue-full-calendar这个插件有很多文章,但大多是移动端,满足我需要的更是一个都没有,无奈只能自己东拼西凑试了很多方法,结果还不错,达到了预期,特意整理一下过程,希望能使跟我有同样需求的小伙伴少走几步弯路demo : github.com/sun...

weixin_34100227的博客 3079

豆包大模型API调用两种方法

ps: 因为是自用,所以这里图方便采用硬编码密钥的形式;如果有需求/安全风险,建议参考官方教程设置ARK_API_KEY环境变量的方式。坏处是:看别人的教程走了一大圈弯路hh;基础调用的话方法一就可以满足了,也比较方便快捷,容易上手。将 <Model> 替换为 Endpoint ID即可。创建就按照提示填写信息就行,需要实名认证,有免费额度。绿框框里就是Endpoint ID。

kkkkkkkkkasey的博客 1万+

Vue.js下使用vue-full-calendar的那些坑(一)

Vue.js下使用vue-full-calendar的那些坑(一) 近期本实习生接到一个任务就是用大日历组件开发一个日程管理的功能,刚刚接到这个任务时我立马想到了full-calendar的日历组件,因为它接口多,功能强大,但是在vue下使用该full-calendar就得用vue版本的vue-full-calendar,这就导致了一些问题,就是vue-full-calendar没有很详细的api...

我不喜欢打代码的博客 7626

标准工时精益化管理:理论、方法与技巧

ECRS工时分析软件是一款综合性软件,包含了IE软件、IE改善软件、工业工程软件、作业改善/业务改善软件、动作分析软件、作业分析软件、ECRS分析法、ECRS改善手法、时间测量软件、工时测量软件、标准工时计算软件等功能。理论上,标准工时是指在标准的工作环境下,完成一道加工工序所需要花费的人工时间。不同企业、不同工序需要的辅助作业时间和损耗时间各不相同,因此企业需要灵活运用标准工时公式进行计算。总之,标准工时的制定需要综合考虑多种因素,企业可以灵活运用本文介绍的方法和技巧来优化制定流程。

VIOOVI_ECRS的博客 848

ZYNQ PL通过EMIO ETHE1外接PHY由GMII转RGMII

1,设置EMIO方式引出ETHE1 2,从GMII过度到RGMII GMII: 发送 gmii_tx_clk gmii_tx_d[7:0] gmii_tx_en gmii_tx_er 接收 gmii_rx_clk gmii_rx_d[7:0] gmii_rx_dv gmii_rx_er RGMII: 发送 tx_clk tx_d[3:0] tx_ctrl 接收 rx_clk rx_d[3:0] rx_ctrl 首先数据总线从时钟单边沿采样8bit转变为了双边沿采样4bit,从88E1

wangjie36的博客 1万+

vue-full-calendar的使用方法【亲测】

由于项目需要,所以要用到一个vue-full-calendar的这个插件,今天弄了一天,测试了很多,踩了不少的坑。做个简单的记录。 首先要注意插件的使用,需要安装的插件是:vue-full-calendar 而不是 vue-fullcalendar 也不是 calendar,因为我以为vue-fullcalendar和vue-full-calendar是一样的,虽然也能显示,但是具体的配置和vue...

昆明网站建设制作 1万+

探索 .NET 多版本兼容的精美 WinForms UI 控件库:ReaLTaiizor

你可以根据需要修改主题的颜色方案。// 示例:修改主题颜色设置主色和次色。应用到中。通过继承和重写控件的方法,可以实现自定义样式。// 示例:自定义 MetroButton 样式// 自定义绘制逻辑创建类继承自。重写OnPaint方法,添加自定义绘制逻辑。

墨夶的博客 1509

用vue-full-calendar实现酒店预定管理展示

近些天有位做酒店业务朋友问到我,有没有前端比较好用的预定日历查看插件,实际上我也没有研究过,毕竟我的专长还是后端,不过迫与多年好友关系,帮他研究了一把,现在前端发展的真的是非常快,今天分享一款比较好用的预定日历展示插件,并给出主要的使用演示。大概实现的思路是,展示完整的月预定日历,并且实现点击每一个预定,弹窗展示一下具体的预定信息。

黑夜开发者的博客 2081

Simulink实例--电动汽车充电站与微电网协同运行仿真

​电网负荷剧增:单站1000台车同时充电需150MW功率(超配电网容量30%)​能源孤岛问题:传统充电站仅作为单向负荷,无法参与电网调频​可再生能源消纳:光伏/风电波动导致充电站功率波动±40%​多目标矛盾:充电效率、电网稳定性、设备寿命的协同优化​节能效果:每百万辆车年节电1.8GWh​成本回收:投资回报周期<4年(IRR>25%)​减排效益:每年减少CO₂排放12万吨。

xiaoheshang_123的博客 330

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

探索传统与现代的结合:Vue-Lunar-Full-Calendar

探索传统与现代的结合:Vue-Lunar-Full-Calendar vue-lunar-fullcalendar项目地址:https://gitcode.com/gh_mirrors/vu/vue-lunar-fullcalendar 在当今Web开发中,对本地化和个性化日历需求的增长不言而喻。Vue-Lunar-Full-Calendar是一个创新的Vue组件,它将全功能的日历系统与传统的农...

gitblog_00089的博客 538

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

vue-full-calendar解决slotMinutes问题【改为slotDuration 】

最近在用vue-full-calendar这个插件做日历历程,但是设置时间间隔slotMinutes没有用,最终发现是版本的问题,在v1版本使用的是slotMinutes,但是到了v2使用的就是slotDuration了,而且这里面的配置也发生了变化。 在v1的配置是: slotMinutes:20, 在v2的配置是:slotDuration:'00:20:00', 这个配置在v1是用数字做配置...

昆明网站建设制作 1557

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

vue项目中vue-fullcalendar的使用(行程日历)

vue-fullcalendar 行程日历插件的使用 (没有灵魂式的记录) 1.首先npm下载 vue1或者vue2 //forVue2 npminstallvue-fullcalendar@latest--save //forVue1 npminstallvue-fullcalendar@0.1.11--save 2.main.js中要引入 import...

qq_38372917的博客 1万+

vue 日历 事件

1、vue-fullcalendar https://www.jianshu.com/p/1b4858e06662 https://github.com/Wanderxx/vue-fullcalendar 还有类似的牛逼插件 https://fullcalendar.io/#demos 2、vue-full-calendar https://github.com/sunhuihui...

zb0567的专栏 1434

[vue]-插件vue-fullcalendar的使用

一、安装 npm install vue-full-calendar 二、使用步骤 1、main.js全局引入 import FullCalendar from 'vue-full-calendar' Vue.use(FullCalendar) 或者在需要用到的组件中局部引入,需要注册和引入样式: import { FullCalendar } from 'vue-full-c...

小花生编程 4106

VUE日历控件-2

日历 https://www.jianshu.com/p/3e652dc44633 日历 https://www.pianshen.com/article/7317257009/

YhWyl527的博客 193
下一篇: 根据数据状态动态渲染不同颜色的卡片列表
꯭零꯭度꯭。꯭
博客等级 码龄7年 25粉丝 18原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值