一种数据展示方式,UI设计新颖,供大家参考(源码部分) (demo已经上传)

大数据平台展示可视化效果,echarts图表实战项目(源码50套) 最近接了个任务需要用H5在前台两个大电视上做两页数据展示公司的产品数据,效果要高大上,充分展示咱们公司的实力,给各位来公司参观的大能们留下深刻的印象。 还好之前接触过HTML5,所以第一时间想到就是echarts,这个框架对于数据展示尤其图表类处理的还是非常强大和炫酷的。 说干就干,首先到官网上把框架下下来,各组件Demo和API都熟悉下,对于你想要的东西和效果心里有个底,就开始动工了。 官网地址是:https://echarts.apache.org,里面的Demo都是代码和效果图文并貌,还可以在线修改 阅读详情


调用方法:

var parameter = {
              url: 'json/report.txt',
              data: data,
              marker: 'value',
              titleClick: function (t) {
                alert(t.html());  
              }
          };
          $('#container').latticeControl(parameter);

其中data为:

{"success":true,"data":[{"title":"OTHER","data":{"January":2378579,"February":2026040,"March":2247718,"April":3055005,
"May":3427766,"June":4043157},"total":1.7178265E7},{"title":"Suzhou","data":{"January":2414166,"February":2056633,
"March":2455726,"April":2287793,"May":2228349,"June":2159281},"total":1.3601948E7},{"title":"Nanjing",
"data":{"January":1618640,"February":1480353,"March":1763553,"April":1751279,"May":1640309,"June":1603294},
"total":9857428.0},{"title":"Wuxi","data":{"January":1207621,"February":1081559,"March":1306533,"April":1202234,
"May":1158849,"June":1121379},"total":7078175.0},{"title":"Nantong","data":{"January":901609,"February":899929,
"March":1057929,"April":950595,"May":917272,"June":889076},"total":5616410.0},{"title":"Changzhou",
"data":{"January":838039,"February":762853,"March":920973,"April":853114,"May":812868,"June":800531},"total":4988378.0},
{"title":"Suqian","data":{"January":255216,"February":263098,"March":316585,"April":279431,"May":275249,"June":268625},
"total":1658204.0}],"currentDim":"city_host","availableDims":[{"id":"is_campus","num":3},{"id":"is_iphone","num":3},
{"id":"city_host","num":14},{"id":"sex","num":3},{"id":"city_user","num":15},{"id":"ages","num":7},{"id":"user_type","num":2},
{"id":"charge_type","num":6}],"max":17178265,"sum":8.3638812E7,"totalItems":14,"page":1,"totalPage":1}



/*
 parameter: {
  
 }
 */
$.fn.latticeControl = function (parameter) {
  var nativeObj = $(this);  

  var commonFn = (function () {
    //Format integer
    function _formatIntNum(amtstr) {
      var isInt = function (num) {
        return (num % 1 === 0);
      };
      var amtstr = (isInt(amtstr)) ? amtstr : Number(amtstr).toFixed(0);
      amtstr = "" + amtstr;
      var a, renum = '';
      var j = 0;
      var a1 = '', a2 = '', a3 = '';
      var tes = /^-/;
      var isCurrency = (typeof (isCurrency) != 'undefined') ? isCurrency : true;

      a = amtstr.replace(/,/g, "");
      a = a.replace(/[^-\.,0-9]/g, "");
      a = a.replace(/(^\s*)|(\s*$)/g, "");
      if (tes.test(a))
        a1 = '-';
      else
        a1 = '';
      a = a.replace(/-/g, "");
      if (a != "0" && a.substr(0, 2) != "0.")
        a = a.replace(/^0*/g, "");
      j = a.indexOf('.');
      if (j < 0)
        j = a.length;
      a2 = a.substr(0, j);
      a3 = a.substr(j);
      j = 0;
      for (i = a2.length; i > 3; i = i - 3) {
        renum = "," + a2.substr(i - 3, 3) + renum;
        j++;
      }
      renum = a1 + a2.substr(0, a2.length - j * 3) + renum + a3;
      return renum;
    }
    
    //Get the width of container
    function _getContainerWidth() {
      var strWidth = new String(nativeObj.css('width'));
      var width = parseInt(strWidth);
      return width;
    }
    
    //Handle the maxmize value
    function _handleMaxValue(maxvalue) {
      if (maxvalue < 100) {
        return 100;
      }
      else {
        if (maxvalue < 1000) {
          return 1000;
        }
        else {
          var strvalue = new String(maxvalue.toFixed(0));
          var intvalue = parseInt(strvalue.substring(0, 2));
          return (intvalue + 1) * _exp(strvalue.length - 2);
        }
      }

      function _exp(num) {
        var value = 10;
        for (var i = 1; i < num; i++) {
          value = value * 10;
        }
        return value;
      }
    }
    
    //Transfer input data
    function _transferData(obj) {
      // {'title': 'TIANJIN', 'amount': '', 'data': [['January', '20%'], ['February', '15%'], ['March', '9%'], ['May', '8%'], ['June', '5%'], ['July', '43%']]}
      var max = _handleMaxValue(obj.max);
      var reArray = [];
      var result = '';
      for (var i = 0; i < obj.data.length; i++) {
        var dataArray = [];
        result = '{"sum": "' + obj.sum + '", "pagesize": "' + obj.totalItems + '", "title": "';
        result += obj.data[i].title;
        result += '", "amount": ';
        result += '"' + obj.data[i].total + '", ';
        result += '"data": ';
        for (var item in obj.data[i].data) {
          //result += '["' + item + '", "' + obj.data[i].data[item] / max + '", "' + obj.data[i].data[item] + '"]';
          dataArray.push([item,
            _transferPercent(obj.data[i].data[item]),
            obj.data[i].data[item],
            ((obj.data[i].data[item] / obj.data[i].total) * 100).toFixed(2) + "%"
          ]);
        }
        result += JSON.stringify(dataArray);
        dataArray = [];
        result += '}';
        reArray.push(eval('(' + result + ')'));
      }
      return reArray;

      function _transferPercent(num) {
        return ((num / max) * 100).toFixed(2) + "%";
      }
    }
    
    //Create lattices html code
    function _getLatticeHtml(data, marker) {
      var result = '', sp = true;
      if (marker != null && marker != undefined) {
        sp = (marker === 'percentage');
      }
      for (var i = 0; i < data.length; i++) {
        result += '<div class="row" data-page="' + data[i].pagesize + '" data-amount="' + data[i].sum + '">';
        //part
        result += '<ul class="noliststyle">';
        result += '<li class="marginbottom"><span class="title"> '
          + data[i].title
          + '</span><span class="show" data="'
          + ((i === 0) ? '%' : '')
          + _transferPercent(data[i].amount / data[i].sum)
          + '">'
          + ((i === 0) ? '%' : '')
          + _transferPercent(data[i].amount / data[i].sum)
          + '</span></li>';
        result += '<li>';
        result += '<ul class="lattice-part noliststyle">';
        var width, itemwidth, bodywidth = _getContainerWidth();

        var containerwidth = bodywidth - 120 - (data[i].data.length - 1) * 3;
        var sumwidthofli = 0;

        for (var k = 0; k < data[i].data.length; k++) {
          width = sp ? parseFloat(data[i].data[k][3]) : parseFloat(data[i].data[k][1]);
          itemwidth = Math.round(width * containerwidth / 100);
          itemwidth = itemwidth === 0 ? 3 : itemwidth;
          if (k === 0) {
            result += '<li marker="first" style="width:' + itemwidth + 'px"><a title="month">';
          } else {
            if (k === (data[i].data.length - 1)) {
              result += '<li style="width:' + (sp ? (containerwidth - sumwidthofli) : itemwidth) + 'px"><a title="month">';
            } else {
              result += '<li style="width:' + itemwidth + 'px"><a title="month">';
            }
          }
          sumwidthofli += itemwidth;
          result += (data[i].data[k][0] + '</a> <a>|</a> <a title="value" percentvalue="'
            + _switchPercent(data[i].data[k][3])
            + '" figurevalue="'
            + _formatIntNum(data[i].data[k][2])
            + '">'
            + (sp ? data[i].data[k][3] : _formatIntNum(data[i].data[k][2]))
            + '</a></li>');
        }
        if (!sp) {
          result += '<li class="fill" style="width:' + (containerwidth - sumwidthofli - 3) + 'px"></li>';
        }
        result += '<li class="last" data="'
          + _formatIntNum(data[i].amount)
          + '">'
          + _formatIntNum(data[i].amount)
          + '</li>';
        result += '</ul>';
        result += '</li>';
        result += '</ul>';
        result += '</div>';
      }
      return result;

      function _transferPercent(num) {
        return (num * 100).toFixed(2);
      }
      function _switchPercent(str) {
        var pstr = new String(str);
        pstr = pstr.replace('%', '');
        return pstr;
      }
      function _getFillWidth(pdata) {
        var psum = 0;
        for (var pi = 0; pi < pdata.length; pi++) {
          psum += parseFloat(_switchPercent(pdata[pi][1]));
        }

        var result = parseInt((100 - psum) / 100 * containerwidth);
        return result;
      }

    }
    
    //Move lattice
    function _moveLattice(lattice) {
      //get the class attribute
      var thisClass = lattice.attr("class");

      //when the class of this item is 'first' or 'last', do nothing
      if (thisClass === "last" || lattice.attr("marker") === "first") {
        return;
      }
      var twidth = new String(lattice.css("width"));
      var width = parseInt(twidth.replace('px', ''));
      var arrayli = _getLeftItem(lattice.parent(), _getMarginLeft(lattice));
      lattice.animate({ marginLeft: '0px' });
      for (var i = 0; i < arrayli.length; i++) {
        arrayli[i].animate({ marginLeft: (_getMarginLeft(arrayli[i]) + width + 3) });
      }
    }

    //Recover lattices that in front of current lattice and reset the current one
    function _recoverLattices(lattice, targetLattice) {
      var latticeWidth = _getCssAttr(lattice, 'width');

      //Recover the lattices that in front of current lattice first
      var frontArray = _getFrontOf(), sumWidth = 0;
      for (var i = 0; i < frontArray.length; i++) {
        frontArray[i].animate({ marginLeft: _getCssAttr(frontArray[i], 'margin-left') - latticeWidth - 3 });
        sumWidth += (_getCssAttr(frontArray[i], 'width') + 3);
      }

      //Recover the current lattice      
      lattice.removeClass('moved').removeAttr('marker');
      if (sumWidth !== 0) {
        lattice.animate({ marginLeft: sumWidth }, 500, function() {
          if (targetLattice !== null) {
            _moveLattice(targetLattice);
          }
        });
      } else {
        _moveLattice(targetLattice);
      }

      function _getFrontOf() {
        var array = [];
        var target = lattice.prev();
        while (target.is('li')) {
          array.push(target);
          target = target.prev();
        }
        return array;
      }
    }
    
    //Get the css attribute 'margin-left' of appointed object
    function _getMarginLeft(obj) {
      var strleft = new String(obj.css('margin-left'));
      var l = parseInt(strleft.replace('px', ''));
      return l;
    }
    
    //Get the css attribute and convert it to integer
    function _getCssAttr(obj, css) {
      var str = new String(obj.css(css));
      var result = parseFloat(str.replace('px', ''));
      return result;
    }
    
    //Get the lattice whose css attribute 'margin-left' is less than the appointed
    function _getLeftItem(containerobj, marginleft) {
      var result = [];
      containerobj.find("li").each(function () {
        var l = _getMarginLeft($(this));
        if (l < marginleft) {
          result.push($(this));
        }
      });
      return result;
    }

    return {
      formatIntNum: _formatIntNum,
      getContainerWidth: _getContainerWidth,
      getLatticeHtml: _getLatticeHtml,
      getCssAttr: _getCssAttr,
      moveLattice: _moveLattice,
      recoverLattices: _recoverLattices,
      transferData: _transferData
    }
  })();

  nativeObj.html(commonFn.getLatticeHtml(commonFn.transferData(parameter.data), parameter.marker));

  
  //Set the css attribute 'margin-left' for every lattice in every row
  nativeObj.find('.row .lattice-part li').each(function () {
    strwidth = new String($(this).css("width"));
    if ($(this).index() > 0) {
      width += 3;
      if ($(this).attr("class") != "last") {
        $(this).css('margin-left', (width + 'px'));
      }
      width += parseInt(strwidth.replace('px', ''));
    }
    else {
      width = parseInt(strwidth.replace('px', ''));
    }
  });

  
  //Here, create a div, put it in the page, it'll be used to show the detail information of every lattice when mouse-hover event triggers
  var hoverContainer = document.createElement('div');
  hoverContainer.id = 'container_showLatticeData';
  //Set the class to this object
  hoverContainer.className = 'lattice-data';
  $(hoverContainer).appendTo($('body'));

  
  //Add mouse-hover event for every lattice in every row
  nativeObj.find('.row .lattice-part li[class!="last"]').hover(function () {
    var offset = $(this).offset();
    if (commonFn.getCssAttr($(this), 'margin-left') === 0) {
      var titleWidth = new String($(this).parent().parent().prev().find('span:eq(0)').css('width'));
      titleWidth = titleWidth.replace('px', '');
      var intWidth = parseInt(titleWidth) + 10;
      offset.left += intWidth;
    }

    $('#container_showLatticeData').html($(this).html()).css({
      left: offset.left,
      top: offset.top - 29
    }).show();

    if (!$(this).hasClass('clicked') && !$(this).hasClass('moved')) {
      $(this).addClass('hover');
    }    
  }, function () {
    $('#container_showLatticeData').hide();
    $(this).removeClass('hover');
  });

  
  //Add click event for every lattice in every row
  nativeObj.find('.row .lattice-part li[class!="last"]').click(function () {
    var index = $(this).index(),
      arrayLi = [],
      thisClass = $(this).attr('class'),
      moved = ($(this).parent().find('li[marker="moved"]').length > 0);

    nativeObj.find('.row').each(function () {
      arrayLi.push($(this).find('.lattice-part li:eq(' + index + ')'));

      //Remove the attribute 'marker' of the first lattice
      if (thisClass === 'clicked') {
        $(this).find('.lattice-part li:eq(0)').removeAttr('marker');
      }
      //Recover the attribute of the first lattice
      if (thisClass === 'moved') {
        $(this).find('.lattice-part li:eq(0)').attr('marker', 'first');
        var lastLattice = $(this).find('.lattice-part li[class="last"]'),
            showSpan = $(this).find('span[class="show"]');
        lastLattice.html(lastLattice.attr('data'));
        showSpan.html(showSpan.attr('data'));
      }
      if (thisClass === 'hover') {
        $(this).find('.lattice-part li').removeClass('clicked').removeClass('moved');
        var targetLattice = $(this).find('li:eq(' + index + ') a:eq(2)');
        $(this).find('.lattice-part li[class="last"]').html(targetLattice.attr('figurevalue'));
        $(this).find('span[class="show"]').html(targetLattice.attr('percentvalue'));
      }
    });

    for (var i = 0; i < arrayLi.length; i++) {
      if (thisClass === 'clicked') {
        if (moved) {
          commonFn.recoverLattices(arrayLi[i].parent().find('li[marker="moved"]'), arrayLi[i]);
        } else {
          commonFn.moveLattice(arrayLi[i]);
        }
        arrayLi[i].addClass('moved').removeClass('clicked').attr('marker', 'moved');
      } else if (thisClass === 'hover') {
        arrayLi[i].addClass('clicked').removeClass('hover');
      } else if (thisClass === 'moved') {
        commonFn.recoverLattices(arrayLi[i], null);
      }
    }

  });

  
  //Add title click event
  nativeObj.find('.row span[class="title"]').click(function () {
    parameter.titleClick($(this));
  });

};

基于SpringBoot的图片上传与显示(附源码) Demo地址 https://github.com/HelloSummer5/FileUploadDemo 效果图预览 思路 一般情况下都是将用户上传的图片放到服务器的某个文件夹中,然后将图片在服务器中的路径存入数据库。本Demo也是这样做的。 由于用户自己保存的图片文件名可能跟其他用户同名造成冲突,因此本Demo选择了使用UUID来生成随机的文件名解决冲突。 但是本Demo不涉... 阅读详情

相关推荐

Unity模拟经营类游戏Demo部分代码及技术总结

7月份自己做了一个模拟经营类的游戏Demo,在此总结UI、库存系统、交易系统、游戏循环等相关内容的代码和实现。

QiHai的博客 7511

html实现酷炫美观的可视化大屏(十种风格示例,附源码)

html实现酷炫美观的可视化大屏(十种风格示例,附源码),大屏源码,可视化大屏模板源码,html可视化大屏源码下载,内含十种不同风格的大屏可视化代码,详细的讲解,酷炫的线条,美观的设计,让图文图表结合的更融洽。兼容各种大屏,调整页面到合适的分辨率,F12全屏观看。各种风格都有,代码上手简单,代码独立,可以直接使用。也可直接预览效果。

不踩坑,不知道坑有多深;不总结,踩过的坑白踩。 21万+

构建用户界面:UI框架Demo与实践

在现代Web开发中,UI框架扮演着构建用户界面的重要角色,提供了一系列可复用的组件和工具,来简化开发者的工作流程。UI框架不仅加速了开发过程,还确保了界面的一致性和美观。本章将对UI框架中的主要组件进行深入探讨,并解释它们的实现方式。响应式Web设计(Responsive Web Design)是通过使用灵活的网格布局、图像和CSS媒体查询等技术,使网页能够自动适应不同分辨率和屏幕尺寸的设备。它确保内容在不同设备上呈现良好,从而提供一致的用户体验。随着移动设备的普及,响应式设计变得至关重要。

weixin_32687875的博客 781

全国疫情数据可视化展示(详细介绍,含完整源码)

全国疫情数据可视化展示(详细介绍,含完整源码)

CherriesOvO的博客 2421

大数据可视化UI样例

大数据 big data 可视化UI样例html Demo,可提取样式、布局、控件等,数据大屏视觉效果必备神器!

大数据展示HTML模板.rar

大数据展示HTML模板,丰富的图标和地图,及各种统计图,是一个非常不错的模板,适合新手和中级水平的开发人员做个参考和学习

k8s学习-StatefulSet(模板、更新、扩缩容、删除等)_statefulset模板

name: web。

2401_84281594的博客 777

36个漂亮的各类型网站源代码

36个漂亮的各类型网站源代码,各种网站布局,可以随便套出自己想要的布局

ssm在线学习数据分析展示系统 计算机毕设源码32651

在线学习数据分析展示系统主要功能模块包括学习时长分析、各科成绩分析、各科学习对比、科目分类、各科成绩对比、学生成绩分析等信息维护,采取面对对象的开发模式进行软件的开发和硬体的架设,能很好的满足实际使用的需求,完善了对应的软体架设以及程序编码的工作,采取MySQL作为后台数据的主要存储单元,采用java技术、Ajax技术进行业务系统的编码及其开发,实现了本系统的全部功能。本次报告,首先分析了研究的背景、作用、意义,为研究工作的合理性打下了基础....

weixin1_ZYKJ985的博客 1259

MDK开发篇:基于立创逻辑派FPGA-G1与Cortex-M1软核的按键控制LED实战

本文详细介绍了基于立创逻辑派FPGA-G1开发板与高云Cortex-M1软核的完整开发流程。通过Gowin云源软件配置软核系统与GPIO外设,并在Keil MDK环境中编写按键控制LED的C程序,最终实现程序固化与上电自启动。教程涵盖硬件配置、软件开发、在线调试与固化部署全步骤,帮助STM32开发者快速上手FPGA软核开发。

weixin_42103128的博客 148

基于FPGA的图像预处理系统(图)

 北京机械工业学院 韩娟娟 邓文怡 娄小平 由于获取图像的工具或手段的影响,使获取图像无法完全体现原始图像的全部信息。因此,对图像进行预处理就显得非常重要。预处理的目的是改善图像数据,抑制不需要的变形或者增强某些对于后续处理来说比较重要的图像特征。通常根据预处理目的的不同,把预处理技术归为图像增强技术和图像分割技术两类。图像对比度处理是空间域图像增强的一种方法。由于图像灰度范围狭窄会使

lyzhangxianglove的专栏 1780

Laravel通用权限管理系统

一款 PHP 语言基于 Laravel8、Layui、MySQL等框架精心打造的一款模块化、插件化、高性能的前后端分离架构敏捷开发框架,可用于快速搭建前后端分离后台管理系统,本着简化开发、提升开发效率的初衷,框架自研了一套个性化的组件,实现了可插拔的组件式开发方式:单图上传、多图上传、下拉选择、开关按钮、单选按钮、多选按钮、图片裁剪等等一系列个性化、轻量级的组件,是一款真正意义上实现组件化开发的敏捷开发框架,框架已集成了完整的RBAC权限架构和常规基础模块,同时支持多主题切换,可以根据自己喜欢的风格选择想一

西里古里的博客 682

避坑指南:C# OpenCvSharp调用4K摄像头常见的5个问题及解决方案

本文针对C# OpenCvSharp调用4K高清摄像头时常见的五大难题,提供了详细的解决方案。内容涵盖分辨率设置失效、帧率卡顿、内存泄漏、硬件驱动兼容性以及性能优化实战,帮助开发者高效稳定地处理4K视频流,提升智能安防监控等项目的开发效率。

weixin_29268331的博客 424

PyQt5使用Designer设计UI的两种实现方式

在上一篇博客Python界面库-PyQt5初探中留了一个坑,那就是如何利用Qt的Designer设计出的UI文件。本篇博客就来研究这个问题。请注意:这里只是讲如何使用Ui文件,而不会讲如何设计Ui文件,如何需要学习如何设计Ui的话,请移步到Qt5 GUI编程之类的话题去。一、Qt的方式    使用过Qt,尤其是在visual studio中使用过Qt的应该知道,在编码的过程中Qt会对一些特殊文件进行

kestiny的专栏 5万+

STM32结合FFT与窗函数优化,实现高精度正弦信号提取

本文详细介绍了如何在STM32嵌入式平台上结合FFT算法与窗函数优化技术,实现高精度正弦信号提取。通过分析频谱泄漏原理,对比汉宁窗、汉明窗等窗函数特性,并提供实际代码示例和幅值补偿方法,有效解决了工业检测中信号精度不足的问题。

v5w6x的博客 221

【从零开始学习 SystemVerilog】1.1、SystemVerilog 概述

【从零开始学习 SystemVerilog】1.1、SystemVerilog 概述

努力,加油每一天鸭~ 1037

element-ui Upload 上传文件

element-ui Upload 上传文件 需求描述:如图所示,upload 只是用来选择文件,在点击提交的时候再和其他的数据统一上传,并且要限制该文件只能上传一个,为用户最后选择的那个文件。 不使用 action 属性 上传 官方文档 文档中描述到: action:是必选参数,上传的地址; http-request: 覆盖默认的上传行为,可以自定义上传的实现, 使用该属性的时候设置action 的属性值为# 只能上传单个文件,并能覆盖上传 官网 API 里有一个属性,limit(number

前端踩坑之路 2万+

unity从3D升级到urp管线,打包ab包后,材质全部变紫色

确保材质中的被转换为 URP 兼容的着色器。在打包 AssetBundle 时,确保所需的着色器被正确打包。确保运行 AB 包的目标项目中正确配置了 URP 渲染管线。如果加载后材质丢失,检查 AB 包的加载逻辑,确保材质正确应用了着色器。通过这些步骤,你应该能够解决从标准渲染管线切换到 URP 渲染管线后,材质在 AB 包中变紫色的问题。如果问题仍然存在,请根据具体错误日志进一步排查。希望如上措施及解决方案能够帮到有需要的你。

**My Coding Family** 1962

【亲测免费】 微信小程序MBTI性格测试Demo源码介绍

微信小程序MBTI性格测试Demo源码介绍 【下载地址】微信小程序MBTI性格测试Demo源码介绍 此Demo源码提供了完整的微信小程序实现方案,包括但不限于界面设计、交互逻辑以及数据处理等关键部分。通过这个小程序,用户可以进行自我性格测评,获取性格类型的分析报告,并了解到更多关于MBTI的知识 ...

gitblog_09763的博客 1903

实时系统vxWorks - 虚拟机环境搭建

概述VxWorks 操作系统是美国WindRiver公司于1983年设计开发的一种嵌入式实时操作系统(RTOS),是嵌入式开发环境的关键组成部分。良好的持续发展能力、高性能的内核以及友好的...

不只会拍照的程序猿 7853

YOLOv8_obb训练流程-原理解析[旋转目标检测理论篇]

本文主要介绍了YOLOv8旋转目标检测的流程,介绍了标签的解码、预测结果的解码,以及如何理解旋转角度等内容,还介绍旋转目标检测框的正样本选取及Loss计算。

ice 4732

极客美学:探秘Demo Scene那些古怪而迷人的用户界面

探秘Demo Scene那些古怪而迷人的UI设计,带你领略反直觉交互背后的极客美学。从炫技的视觉干扰到硬核的汇编环境,你将见证开发者如何在技术限制下释放狂野创意,感受代码与艺术碰撞的独特魅力 ✨。

yweng18的博客 361

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

springboot+vue+elementui实现文件上传下载删除DEMO

说明 前面搜索了几个关于springboot+vue+elementui上传下载的文章,感觉写的都不尽如人意。要么是功能不完善,不好用。再者就是源码提供的实在差劲,都不完整。一气之下,自己搞了一个实用的完整版DEMO,有需要的朋友拿走稍加改动就能使用。 项目源码 源码已经整理好了,如何运行直接看根路径下的README.md。 https://gitee.com/indexman/springbootdemo 效果展示 工程结构 前端代码 <!DOCTYPE html> <html l

老徐的博客只有干货 1781

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

【提升应用体验】探索JavaFX进度条Demo:简洁高效的UI设计实践

【提升应用体验】探索JavaFX进度条Demo:简洁高效的UI设计实践 去发现同类优质开源项目:https://gitcode.com/ 在追求用户体验至上的今天,一个直观且优雅的进度显示机制对于任何应用程序都是至关重要的。今天,我们将深入探讨一个专注于JavaFX平台的开源项目——《JavaFX 进度条Demo源码》,这是一款专为开发者准备的小巧却功能强大的工具,旨在简化进度条的实现过程,让应用...

gitblog_09702的博客 691

深度学习工具包 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&#39;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(&#39;DeepLearnToolbox&#39;));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(&#39;state&#39;,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&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,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 = &#39;sigm&#39;;%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, &#39;Too big error&#39;);```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(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;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)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;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, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% 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&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 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, &#39;Too big error&#39;);```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(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % 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, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);%% 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(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 详解CSS3 Transition动画效果
下一篇: 浅谈Javascript中undefined和null的区别
抱猫睡觉的鱼
博客等级 码龄18年 10粉丝 31原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值