vue实现table课程表

vue实现动态课程表(TimeTable) 动态课程表、安排表 阅读详情

方案一

采用二维数组,固定显示每周7天及固定课节数,无数据的天及课节也会固定占位

在这里插入图片描述

<template>
    <div class="class-table">
        <div class="table-wrapper">
            <div class="tabel-container">

                <table>
                    <thead>
                        <tr>
                            <th>时间</th>
                            <th v-for="(weekNum, weekIndex) in classTableData.courses.length" :key="weekIndex"> {{'周' + digital2Chinese(weekIndex, 'week')}}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(lesson, lessonIndex) in classTableData.lessons" :key="lessonIndex">
                            <td>
                                <p>{{'第' + digital2Chinese(lessonIndex+1) + "节"}}</p>
                                <p class="period">{{ lesson }}</p>
                            </td>

                            <td v-for="(course, courseIndex) in classTableData.courses" :key="courseIndex">
                                {{classTableData.courses[courseIndex][lessonIndex] || '-'}}
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    data() {
        return {
            classTableData: {
                lessons: [
                    '08:00-09:00',
                    '09:00-10:00',
                    '10:00-11:00',
                    '11:00-12:00',
                    '13:00-14:00',
                    '14:00-15:00',
                    '15:00-16:00',
                    '16:00-17:00'
                ],
                courses: [
                    ['', '', '', '', '', '', '', ''],
                    ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文'],
                    ['语文', '数学', '英语', '历史', '', '化学', '物理', '生物'],
                    ['生物', '', '化学', '政治', '历史', '英语', '数学', '语文'],
                    ['语文', '数学', '英语', '历史', '政治', '', '物理', '生物'],
                    ['生物', '物理', '化学', '', '历史', '英语', '数学', '语文'],
                    ['语文', '数学', '英语', '', '', '', '', ''],
                ]
            }

        };
    },
    created() {
    	// /* mock随机数据*/
        // Mock.mock({
		//     lessons: ['08:00-09:00', '09:00-10:00', '10:00-11:00', '11:00-12:00', '13:00-14:00', '14:00-15:00', '15:00-16:00', '16:00-17:00'],
		//     'courses|7': [['生物', '物理', '化学', '政治', '历史', '英语', '', '语文']]
		// });
    },
    methods: {
        /**
        * 数字转中文
        * @param {Number} num 需要转换的数字
        * @param {String} identifier 标识符
        * @returns {String} 转换后的中文
        */
        digital2Chinese(num, identifier) {
            const character = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
            return identifier === 'week' && (num === 0 || num === 7) ? '日' : character[num];
        }
    }
};
</script>

<style lang="scss" scoped>
.class-table {
    .table-wrapper {
        width: 100%;
        height: 100%;
        overflow: auto;
    }
    .tabel-container {
        margin: 7px;

        table {
            table-layout: fixed;
            width: 100%;

            thead {
                background-color: #67a1ff;
                th {
                    color: #fff;
                    line-height: 17px;
                    font-weight: normal;
                }
            }
            tbody {
                background-color: #eaf2ff;
                td {
                    color: #677998;
                    line-height: 12px;
                }
            }
            th,
            td {
                width: 60px;
                padding: 12px 2px;
                font-size: 12px;
                text-align: center;
            }

            tr td:first-child {
                color: #333;
                .period {
                    font-size: 8px;
                }
            }
        }
    }
}
</style>

方案二

固定显示每周7天及固定课节数,无数据的天及课节也会固定占位
在这里插入图片描述

<template>
    <div class='class-table'>
        <div class='table-wrapper'>
            <div class='tabel-container'>
                <table>
                    <thead>
                        <tr>
                            <th>时间</th>
                            <th v-for='(week, index) in weeks' :key='index'> {{'周' + digital2Chinese(index+1, 'week')}}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for='(item, index) in classTableData' :key='index'>
                            <td>
                                <p>{{'第' + digital2Chinese(index+1) + '节'}}</p>
                                <p class='period'>{{ item.classesTime }}</p>
                            </td>

                            <td v-for='(week, index) in weeks' :key='index'>
                                {{item[week]  || '-'}}
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    data() {
        return {
            weeks: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'],
            classTableData: [{
                'classesTime': '08:00-09:00',
                'monday': '物理',
                'tuesday': '英语',
                'wednesday': '政治',
                'thursday': '历史',
                'friday': '化学',
                'saturday': '历史',
                'sunday': '化学'
            }, {
                'classesTime': '09:00-10:00',
                'monday': '生物',
                'tuesday': '物理',
                'wednesday': '化学',
                'thursday': '英语',
                'friday': '化学',
                'saturday': '生物',
                'sunday': '化学'
            }, {
                'classesTime': '10:00-11:00',
                'monday': '生物',
                'tuesday': '物理',
                'wednesday': '生物',
                'thursday': '历史',
                'friday': '生物',
                'saturday': '英语',
                'sunday': '政治'
            }, {
                'classesTime': '11:00-12:00',
                'monday': '',
                'tuesday': '政治',
                'wednesday': '物理',
                'thursday': '政治',
                'friday': '历史',
                'saturday': '历史',
                'sunday': '生物'
            }, {
                'classesTime': '13:00-14:00',
                'monday': '生物',
                'tuesday': '历史',
                'wednesday': '历史',
                'thursday': '历史',
                'friday': '',
                'saturday': '英语',
                'sunday': '化学'
            }, {
                'classesTime': '14:00-15:00',
                'monday': '化学',
                'tuesday': '英语',
                'wednesday': '物理',
                'thursday': '化学',
                'friday': '语文',
                'saturday': '物理',
                'sunday': '英语'
            }, {
                'classesTime': '15:00-16:00',
                'monday': '历史',
                'tuesday': '历史',
                'wednesday': '语文',
                'thursday': '历史',
                'friday': '生物',
                'saturday': '英语',
                'sunday': ''
            }],
            tableShow: false
        };
    },
    created() {
    	// /* mock随机数据*/
        //  Mock.mock({
        //     'data|7': [
        //         {
        //             'classesTime|+1': ['08:00-09:00', '09:00-10:00', '10:00-11:00', '11:00-12:00', '13:00-14:00', '14:00-15:00', '15:00-16:00', '16:00-17:00'],
        //             'monday|1': ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文'],
        //             'tuesday|1': ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文'],
        //             'wednesday|1': ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文'],
        //             'thursday|1': ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文'],
        //             'friday|1': ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文'],
        //             'saturday|1': ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文'],
        //             'sunday|1': ['生物', '物理', '化学', '政治', '历史', '英语', '', '语文']
        //         }
        //     ]
        // });
    },
    methods: {
        /**
        * 数字转中文
        * @param {Number} num 需要转换的数字
        * @param {String} identifier 标识符
        * @returns {String} 转换后的中文
        */
        digital2Chinese(num, identifier) {
            const character = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
            return identifier === 'week' && (num === 0 || num === 7) ? '日' : character[num];
        }
    }
};
</script>

<style lang='scss' scoped>
.class-table {
    .table-wrapper {
        width: 100%;
        height: 100%;
        overflow: auto;
    }
    .tabel-container {
        margin: 7px;

        table {
            table-layout: fixed;
            width: 100%;

            thead {
                background-color: #67a1ff;
                th {
                    color: #fff;
                    line-height: 17px;
                    font-weight: normal;
                }
            }
            tbody {
                background-color: #eaf2ff;
                td {
                    color: #677998;
                    line-height: 12px;
                }
            }
            th,
            td {
                width: 60px;
                padding: 12px 2px;
                font-size: 12px;
                text-align: center;
            }

            tr td:first-child {
                color: #333;
                .period {
                    font-size: 8px;
                }
            }
        }
    }
}
</style>

方案三

根据随机周数及随机课节数渲染

在这里插入图片描述

<template>
    <div class="class-table">
        <div class="table-wrapper">
            <div class="tabel-container">
                <table>
                    <thead>
                        <tr>
                            <th>时间</th>
                            <th v-for="(weekNum, weekIndex) in weeks" :key="weekIndex"> {{'周' + digital2Chinese(weekNum, 'week')}}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(courseNum, courseIndex) in coursesLen" :key="courseIndex">

                            <td>
                                <p>{{'第' + digital2Chinese(courseNum) + "节"}}</p>
                                <p class="period">{{ classTableData.period[courseIndex] }}</p>
                            </td>

                            <td v-for="(weekNum, weekIndex) in weeks" :key="weekIndex">
                                {{ fieldCharacter(weekIndex, courseIndex) }}
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            weeks: [], //周集合
            coursesLen: 0, //最大课节数
            classTableData: { //mock模拟的数据
                period: ['08:00-09:00', '09:00-10:00', '10:00-11:00', '11:00-12:00', '13:00-14:00', '14:00-15:00', '15:00-16:00', '16:00-17:00'], //时间段
                weekCourse: [
                    {
                        'week': 0,
                        'courses': [
                            { 'index': 1, 'title': '物理' },
                            { 'index': 3, 'title': '语文' }
                        ]
                    },
                    {
                        'week': 1,
                        'courses': [
                            { 'index': 3, 'title': '生物' },
                            { 'index': 4, 'title': '语文' },
                            { 'index': 5, 'title': '历史' },
                            { 'index': 6, 'title': '数学' },
                            { 'index': 7, 'title': '英语' },
                            { 'index': 8, 'title': '生物' },
                            { 'index': 1, 'title': '生物' }
                        ]
                    },
                    {
                        'week': 3,
                        'courses': [
                            { 'index': 5, 'title': '英语' },
                            { 'index': 6, 'title': '英语' },
                            { 'index': 7, 'title': '物理' },
                            { 'index': 8, 'title': '英语' },
                            { 'index': 1, 'title': '生物' },
                            { 'index': 2, 'title': '数学' },
                            { 'index': 3, 'title': '英语' }
                        ]
                    },
                    {
                        'week': 4,
                        'courses': [
                            { 'index': 4, 'title': '语文' },
                            { 'index': 5, 'title': '英语' },
                            { 'index': 6, 'title': '生物' },
                            { 'index': 7, 'title': '历史' }
                        ]
                    },
                    {
                        'week': 5,
                        'courses': [
                            { 'index': 8, 'title': '化学' },
                            { 'index': 1, 'title': '英语' }
                        ]
                    }
                ]
            }
        }
    },
    created() {
        this.updateData();
        this.initWeekCourses();
    },
    methods: {
        /**
         * 更新mock模拟的数据,对数据进行排序
         */
        updateData() {

            /* 将数据按从周日到周六排序 */
            this.classTableData.weekCourse.sort((a, b) => {
                return a.week - b.week;
            });

            /* 将数据按从第一节到第n节排序 */
            for (let v of this.classTableData.weekCourse) {
                for (let k in v) {
                    if (k === 'courses') {
                        v[k].sort((a, b) => {
                            return a.index - b.index;
                        });
                    }
                }
            }

            console.log(JSON.stringify(this.classTableData.weekCourse));
        },
        /**
         * 计算周数据及课节数
         */
        initWeekCourses() {
            const that = this;
            this.weeks = []; //周集合
            this.coursesLen = 0; //最大的课节数

            this.weeks = this.classTableData.weekCourse.map((item, index) => {
                for (let k in item) {
                    if (k === 'courses') {
                        let maxCoursesLen = 0;
                        /* 取出一周中最大的课节数及当天的最大课节数 */
                        for (let j of item[k]) {
                            j.index > that.coursesLen && (that.coursesLen = j.index); //取所有一周里最大课节值
                            j.index > maxCoursesLen && (maxCoursesLen = j.index); //取当天最大课节值
                        }


                        /* 如果当天的课节总数小于当天的最大课节值 */
                        if (item[k].length < maxCoursesLen) {
                            for (let i = 0; i < maxCoursesLen; i++) { //以最大课节值为终点遍历当天课节
                                if (!item[k][i] || item[k][i].index != (i + 1)) { //如果下标课节不存在或着与循环的下标不匹配
                                    item[k].splice(i, 0, ''); //填充空课节
                                }
                            }
                        }
                    }
                }
                return item.week;
            });

            console.log(JSON.stringify(this.classTableData.weekCourse));




        },
        /**
         * 处理格子数据,无数据转换为字符串'-'
         * @param {Number} weekIndex 周几对应的下标
         * @param {Number} courseNum 第几节课对应的下标
         * @returns {String} 返回对应的字符
         */
        fieldCharacter(weekIndex, courseIndex) {
            if (
                this.classTableData.weekCourse[weekIndex]
                &&
                this.classTableData.weekCourse[weekIndex].courses[courseIndex]
                &&
                this.classTableData.weekCourse[weekIndex].courses[courseIndex].index === courseIndex + 1
            ) {
                return this.classTableData.weekCourse[weekIndex].courses[courseIndex].title;
            }
            return '-';
        },


        /**
        * 数字转中文
        * @param {Number} num 需要转换的数字
        * @param {Boolean} identifier 标识符
        * @returns {String} 转换后的中文
        */
        digital2Chinese(num, identifier) {
            const character = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
            return identifier === 'week' && (num === 0 || num === 7) ? '日' : character[num];
        },
    }
};
</script>

<style lang="scss" scoped>
.class-table {
    .table-wrapper {
        width: 100%;
        height: 100%;
        overflow: auto;
    }
    .tabel-container {
        margin: 7px;

        table {
            table-layout: fixed;
            width: 100%;

            thead {
                background-color: #67a1ff;
                th {
                    color: #fff;
                    line-height: 17px;
                    font-weight: normal;
                }
            }
            tbody {
                background-color: #eaf2ff;
                td {
                    color: #677998;
                    line-height: 12px;
                }
            }
            th,
            td {
                width: 60px;
                padding: 12px 2px;
                font-size: 12px;
                text-align: center;
            }

            tr td:first-child {
                color: #333;
                .period {
                    font-size: 8px;
                }
            }
        }
    }
}
</style>
仿钉钉排班管理,基于Element Plus的排班表格可编辑实现思路 这样应该空数据表格就好了,再用弹出框组件el-popover来配合按钮(按钮我用着方便,要求美观也能自己写或者其他样式),先要将后端给我的数据做个处理,要所在列有对应行的属性名,所以日期全称fullDate就派上用场,我们在表格数据的每个元素加入循环对象,对象键是对应日期,对象值就是对应班次的name,列如:{2023-12-12:早班}这样 那不管想怎么渲染上表格都可以很轻松,数据的处理根据后端返回给我们的数据来处理,下面是我的处理代码。下面是完整的页面代码。循环遍历渲染出表格头来。 阅读详情

相关推荐

uniapp+vant weapp实现课程表小程序_课程表功能的实现

课程表功能的实现思路1.节数与天数和grid内单选框索引的转换2.单选框样式的魔改温馨提示:尽量用原生源码 思路 课程表的实现,我想了很久,在没有现成组件库的情况下实现,我主要是用了vant weapp的宫格和单选框来实现主要的难点有以下两个方面: 1.节数与天数和grid内单选框索引的转换 返回值给我一个包含课程节数和天数的对象数组,我把它转换成一个包含unit(5节课*7天的对应的数字来定位)的对象数组 2.单选框样式的魔改 单选框直接使用radio的插槽来贴图来适应样式需求 <van-radio

Kätzchen-408的博客 2400

Vue2表格(Table)

展示行列数据。

Vue Amazing UI(Vue3 + TypeScript + Vite)组件库唯一开发维护者 3万+

基于 JAVA+Spring Boot 3 + Vue 3 + 遗传算法的智能排课系统设计与实现

el-select v-model="currentId" placeholder="选择ID" @change="onIdChange" :loading="idLoading">[浏览器] <---> [Nginx] <---> [Vue 3 前端应用] <---> [Spring Boot 3 REST API] <---> [数据库]<el-table-column prop="time" label="时间" fixed width="80" align="center"/>

2201_76125393的博客 105

Vue3表格(Table)

展示行列数据分页表格组件,支持:加载中;暂无数据;带边框;自定义样式;三种尺寸;列对齐方式;斑马条纹;自定义页头和页脚;单元格自动省略;合并单元格;可编辑单元格;可编辑行;可展开;固定列;固定表头;固定头和列;随页面滚动的固定表头和滚动条;表头分组;表格排序;可选择;总之,功能丰富,简单易用😁😁

Vue Amazing UI(Vue3 + TypeScript + Vite)组件库唯一开发维护者 1万+

我的课表(html+vue)

我的课表,运用了vue.js,从后台获取数据进行解析,HTML为响应式。

《物联网技术》课程笔记——第二章 物联网技术架构

文章目录第二章:物联网技术架构1 物联网技术体系(C3SD)2 系统体系结构的基本概念3 物联网体系结构——信息传递视角3.1物联网感知层3.1.1 感知层要解决的问题3.1.2 感知层的形态3.1.3 节点的感知能力与控制能力3.1.4 感知层实例3.2 物联网网络层3.2.1 网络相关概念3.2.2 IPV6与IPV4相比互联网协议的升级3.2.3 计算机网络的逻辑层次3.2.4 传输网的拓扑结构3.2.4.1 举例:智能小区的三表采集系统3.2.4.2 接入层3.2.4.2 汇聚层3.2.4.2 核心

南京大学软件工程硕士在读 2503

课表vue html,vue实现table课程表

方案一采用二维数组,固定显示每周7天及固定课节数,无数据的天及课节也会固定占位时间 {{'周' + digital2Chinese(weekIndex, 'week')}}{{'第' + digital2Chinese(lessonIndex+1) + "节"}}{{ lesson }}{{classTableData.courses[courseIndex][lessonIndex] || '-...

weixin_31517893的博客 1379

IBIS模型中的Pullup和Pulldown曲线详解:如何避免信号完整性设计中的常见错误

本文深入解析IBIS模型中Pullup和Pulldown曲线的关键作用,揭示其在信号完整性设计中的黄金法则。通过详细分析曲线特性、常见误区及验证方法,帮助工程师避免设计错误,优化高速PCB设计。文章还展示了曲线数据在动态终端匹配、串扰预测和电源完整性分析中的高级应用,提升设计效率和可靠性。

weixin_30275415的博客 450

uniapp和vue课程表实现、会议预约实现[表格table相同内容行的合并]

会议预约、课程表、table表格合并相同数据

weixin_42711805的博客 1933

钙钛矿太阳能电池稳定性测试:ISOS协议详解与标准化实践指南

在光伏器件研发中,稳定性测试是评估材料与器件长期可靠性的核心环节,其关键在于实现测试条件的标准化与数据的可比性。通过控制变量和模拟真实环境应力,标准化测试协议能够系统揭示材料衰减机理与器件失效模式,为技术迭代提供可靠依据。在钙钛矿太阳能电池领域,ISOS协议作为国际公认的测试框架,通过分级体系(如ISOS-L系列光照测试与ISOS-D系列暗态测试)和关键参数定义(如光源光谱匹配、MPP跟踪、结温控制),解决了不同实验室数据无法横向对比的痛点。该协议不仅规范了测试流程,还通过硬件系统搭建、自动化数据采集与归一

weixin_33600816的博客 319

从NHANES到发表:如何用survey包完成符合CDC要求的统计分析(含完整R代码)

本文详细介绍了如何利用R语言的survey包,对美国国家健康与营养调查数据进行符合CDC要求的统计分析。文章重点解析了NHANES数据的复杂抽样设计、权重变量的正确选择与调整,并提供了从数据获取、清洗、构建调查设计对象到执行加权回归及生成发表级表格的完整R代码实战指南,帮助研究者避免常见错误,确保分析结果的准确性与可发表性。

weixin_29054245的博客 521

使用vue实现超级课程表的功能【附完整源码】

效果图展示:

研究生在读,分享学习日常。(零基础学习后端编程) 1万+

用Keil5给CH552G编程:手把手配置8051开发环境+LED闪烁实战

本文详细介绍了如何使用Keil5为CH552G单片机配置8051开发环境,并完成LED闪烁实战。从获取必要软件、安装WCH器件库到创建工程、编写程序及烧录,手把手指导开发者避开常见陷阱,特别适合从STC转向CH552G的开发者。

weixin_30733003的博客 538

html使用table标签制作课程表

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>course</title> <style> .table1{ margin: 0; padding: 0; } .xueqi{ wid...

October_27的博客 2644

YOLOv11的嗅觉传感器数据关联-(特殊场景下的气味-视觉联合分析)

摘要 本文探讨了YOLOv11与嗅觉传感器融合的多模态感知技术。通过分析YOLOv11的架构特性与嗅觉传感器的数据特点,提出了三种融合策略:数据级、特征级和决策级融合。系统采用硬件同步方案实现时空对齐,包含视觉采集模块、嗅觉传感模块和边缘计算单元。环境配置基于Python 3.9和PyTorch 2.0,支持实时多模态数据处理。该技术可应用于环境监测、工业检测等场景,突破单一视觉感知的局限性。

本博客聚焦 YOLOv11 全流程落地,涵盖架构优化、数据集处理、训练技巧与多场景部署,兼及国产数据库、Java 开发与 AI 模型应用,内容兼顾理论与工程实践,为开发者提供系统干货,助力高效提升技术能力。 625

半车(前后、左右)、整车悬架详细推导建模和simulink仿真分析

用达朗贝尔定理依据悬架数学模型,得到悬架模型微分方程,分别用simulink建立前后半车、左右半车悬架;结合转向2自由度模型与半车侧倾模型,对模型考虑相干性、延时性的C级随机路面下,仿真分析给定角阶跃输入下的侧倾稳定性。

Mr.邹的博客 1万+

html,css使用表格制作课程表

本篇文章讲解的是使用html中的表格table来制作课程表 完成图如下: 1.html的代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-wi...

rolinabc的博客 8920

【NIPS 2022】时序精选论文07|Non-stationary Transformers: 引入非平稳性信息的平稳化序列预测模型(代码解读附源码)

整体代码框架基本上与传统 Transformer 类似,基本上只有在内嵌的注意力机制模块有区别,因此这里只对关键部分进行讲解,代码整体框架可参考 Transformer。非平稳时序很难预测,尤其对模型泛化性影响很大,试想下推理阶段的数据分布变了,模型很难适应这种变化。,比如很早以前的差分就是一种平稳化操作。序列平稳化能增强数据的可预测性,但这时也会带来一个问题,叫。,通过MLP层进行定义,使得参数可学习,以便于更好的融合到注意力网络中。代码中整体注意力的计算方式与原生Transformer类似,

ViolenceTemper的博客 1491

Vue + element 实现课程表

<template> <div class='class-table'> <div class='table-wrapper'> <div class='tabel-container'> <table> <thead> <tr>

qq_26705343的博客 3685

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

vue + el-table+draggable实现课表单元格拖拽

vue + el-table+draggable实现课表单元格拖拽 <template> <div class="schedule"> <el-table :data="tableData" border style="width: 100%; font-size: 16px"> <el-table-column prop="index" label="节次" width="80"

qq_43604182的博客 7264

深度学习工具包 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")

课程表插件Timetables

课程插件在vue项目中使用 项目中用到之前是用element-table做的,但要求课程一样的要合并单元格,于是啊找了这个插件,分享一下 参考地址: https://github.com/Hzy0913/Timetable 安装: npm install timetables 或者从上面github地址里面下载 Timetables.min.js 参数: 代码 在data里面定义 在mounted里面直接调用 如果有条件查询按钮,在点击时候直接使用srtOption,重新赋值给courseList

Ninewu的博客 3757

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

vue js table colspan rowspan

需求,要写一个菜单权限表。需要做到单元格合并,本来用的antd-vue的表格,然后构造customRender,总感觉有点本末倒置,其实自己实现,更快,而且想改哪里,改哪里。下面是写这个功能前的测试demo。 效果图 代码 <template> <div class="class-table"> <div class="table-wrapper"> <div class="tabel-container"> <

solocao的专栏 2005

若依代码生成器生成前后端代码步骤(以课程表为例)

启动Redis、若依前端、后端项目。

后端小白个人学习记录 710

vue.js【常用UI组件库】

是基于Vue3开发的优秀的PC端开源UI组件库,它是Element的升级版,对于习惯使用Element的人员来说,在学习时,不用花费太多的时间。因为Vue3不再支持IE 11,所以也不再支持IE 11及更低的IE版本。使用npm或yarn包管理工具安装Element Plus。组件库中的组件主要包括基础组件、配置组件、表单组件、数据展示组件、导航和反馈组件以及其他组件。每个组件类别又进行了细分,例如,基础组件包含Button组件、Border。

weixin_74878822的博客 2399

HTML课程表

主要用到的是绘制表格table,调整每个单元格的颜色,大小、以及合并情况,就成功了!我制作的稍微有点简陋,可以参考做的更美观。

m0_63885306的博客 366

vue 将table导出excel且带样式的正确姿势

注意: table 要加上 border="1px" (在页面上因为css不会显示), 不然导出的excel 没有边框。

QQ2856639881的专栏 427
上一篇: vue-cli中使用mockjs拦截axios请求
下一篇: CSS冷门知识大全
lihefei_coder
博客等级 码龄10年 180粉丝 293原创
评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值