Ecshop 编辑器 FCKeditor更换为Kindeditor 完整替换

ecshop彻底编辑器为kindeditor实现在多张图片上传(个人修正) ecshop彻底编辑器为kindeditor实现在多张图片上传 使用过ECSHOP后台产品、文章编辑的朋友都知道ECSHOP编辑器是'FCKeditor,'FCK官早已经不再更新FCKeditor了,但是ECSHOP却一直还在使用,FCKeditor浏览器的缺点:漏洞多,容易被不怀好意的人利用;不能一次上传多张图片。。。。。 最近发现有网友发过关于用kindeditor替换FCKe 阅读详情

在Ecshop 编辑器 FCKeditor更换为Kindeditor 的时候,网上的做法,要么替换成了,数据无法保存,要么只有商品编辑能用,在无数测试下,终于是整合出了完整的替换,对,完整,就是ecshop中整个后台的编辑器都替换成Kindeditor。


前言:如果仅仅需要修改商品编辑的编辑器,只需要参考方案一;如果需要整个ecshop的fck编辑器都要替换,则需要同时启用两个方案。当然,两个方案完全不冲突,方案一针对的是商品编辑那里的编辑器,没有用submit提交的,方案二针对的是用submit提交的。


方案一: 提交数据不是用submit提交的 如,编辑商品详情 那里

1,首先下载kindeitor最新版放到includes目录

修改kindeditor/php目录下面的upload_json.php里面的

//文件保存目录路径

$save_path = $php_path . '../../../images/upload/';

//文件保存目录URL

$save_url = $php_url . '../../../images/upload/';

 

kindeditor默认上传图片的路径是upload下面的image目录下面,以年月日为目录,如:image/20130401 我们把它修改为:以年月划分比较好。

在upload_json.php找到$ymd = date("Ymd"); 改为:$ymd = date("Ym");就可以了。

 

修改includes/kindeditor/php/file_manager_json.php

 

//根目录路径,可以指定绝对路径,比如 /var/www/attached/

$root_path = $php_path . '../../../images/upload/';

//根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/

$root_url = $php_url . '../../../images/upload/';

 

2,删除或者注释 admin/goods.php 大约107行  

include_once(ROOT_PATH . 'includes/fckeditor/fckeditor.php'); // 包含 html editor 类文件

3,更换 admin/goods.php 大约414行  create_html_editor('goods_desc', $goods['goods_desc']); 修改成:

 $FCKeditor = create_html_kindeditor('goods_desc', $goods['goods_desc'], 'theForm');// 最后一个参数theForm是新增的,可以指定后台包含编辑器的表单的名字。

 $smarty->assign('FCKeditor',    $FCKeditor); //这样,ecshop模版里面原有的$FCKeditor就不用再去修改了。

4. 修改 admin/includes/lib_main.php文件,找到大概 大约324行增加create_html_kindeditor行数,代码如下:

/**

 * 生成 kindeditor

 * @param   string  input_name  输入框名称

 * @param   string  input_value 输入框值

 * @param string form_name   所在表单名称

 */

function create_html_kindeditor($input_name, $input_value = '', $form_name = '')

{

    global $smarty;

    $kindeditor = "<script src='/includes/kindeditor/kindeditor-all-min.js' charset='utf-8'></script>

<script src='/includes/kindeditor/lang/zh_CN.js' charset='utf-8'></script>

<script src='/includes/kindeditor/plugins/code/prettify.js' charset='utf-8'></script>

    <script>

   

        KindEditor.ready(function(K) {

var editor1 = K.create('textarea[name=".$input_name."]', {

cssPath : '/includes/kindeditor/plugins/code/prettify.css',

uploadJson : '/includes/kindeditor/php/upload_json.php',

fileManagerJson : '/includes/kindeditor/php/file_manager_json.php',

afterBlur : function() {

                  this.sync();

                  K.ctrl(document, 13, function() {

                  K('form[name=" . $form_name . "]')[0].submit();

        });

        K.ctrl(this.edit.doc, 13, function() {

            K('form[name=" . $form_name . "]')[0].submit();

        });

}

});

 

prettyPrint();

});

    </script>

    <textarea id=\"$input_name\" name=\"$input_name\" style='width:700px;height:300px;'>$input_value</textarea>";

    return $kindeditor;

}

//***说明,这里调用的aterBlur的JS函数,就可以解决ecshop更换kindeditor编辑器,提交数据不保存的原因了,因为如果没调用editor的sync函数的话,编辑器里面生成的内容,没办法保存提交的。

5. kindeditor中 ./php目录下的 file_manager_json.php和upload_json.php中的

$php_path 和 $php_url 改成自己想要的就行了。

 

友情提醒:一般来说这种开源编辑器难免有漏洞公布出来,最好是把kindeditor的路径给改了。这样别人访问不到editor的路径,可以介绍风险。

 

 

方案二: 提交表单用submit提交的 如,文章、邮件、专题那里的编辑器 那里

1,首先下载kindeitor最新版放到includes目录

修改kindeditor/php目录下面的upload_json.php里面的

//文件保存目录路径

$save_path = $php_path . '../../../images/upload/';

//文件保存目录URL

$save_url = $php_url . '../../../images/upload/';

 

kindeditor默认上传图片的路径是upload下面的image目录下面,以年月日为目录,如:image/20130401 我们把它修改为:以年月划分比较好。

在upload_json.php找到$ymd = date("Ymd"); 改为:$ymd = date("Ym");就可以了。

 

修改includes/kindeditor/php/file_manager_json.php

 

//根目录路径,可以指定绝对路径,比如 /var/www/attached/

$root_path = $php_path . '../../../images/upload/';

//根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/

$root_url = $php_url . '../../../images/upload/';

 

2,删除或者注释 admin/goods.php 大约107行  

include_once(ROOT_PATH . 'includes/fckeditor/fckeditor.php'); // 包含 html editor 类文件

3., 把admin/includes/lib_main.php 中的

function create_html_editor()这个方法注释或删除,添加下面的方法

 

/**

 * 生成 kindeditor

 * @param   string  input_name  输入框名称

 * @param   string  input_value 输入框值

 * @paramstringform_name  所在表单名称

 * 

 * 

 * submit 提交的  使用这个方法

 */

 

function create_html_editor($input_name, $input_value = '')

{

    global $smarty;

    $kindeditor="<script charset='utf-8' src='../includes/kindeditor/kindeditor-min.js'></script>

    <script>

        var editor;

            KindEditor.ready(function(K) {

                editor = K.create('textarea[name=\"$input_name\"]', {

                    allowFileManager : true,

                    width : '100%',

                    height: '600px',

                    resizeType: 0    //固定宽高

                });

            });

    </script>

    <textarea id=\"$input_name\" name=\"$input_name\" style='width:100%;height:600px;'>$input_value</textarea>

    ";

    $smarty->assign('FCKeditor', $kindeditor);  

}


ecshop整合替换百度编辑器 ueditor,测试通过 文章为转载以备用,请严格按要求修改, 特别是pageheader.htm这个文件 ================================================================ 1、下载uediter编辑器,解压上传目录uediter到根目录/includes/下 2、修改admin/includes/lib_main.php /** * 生成编辑器 * @param string input_name 输入框名称 * @param string input_value 输入框值 */ function create_html_editor($input_name, $input_value = &#39;&#39;) { global $smarty; $editor = new FCKeditor($input_name); $editor->BasePath = &#39;../includes/fckeditor/&#39;; $editor->ToolbarSet = &#39;Normal&#39;; $editor->Width = &#39;100%&#39;; $editor->Height = &#39;320&#39;; $editor->Value = $input_value; $FCKeditor = $editor->CreateHtml(); $smarty->assign(&#39;FCKeditor&#39;, $FCKeditor); } 修改为: /** * 生成编辑器 * @param string input_name 输入框名称 * @param string input_value 输入框值 */ function create_html_editor($input_name, $input_value = &#39;&#39;) { global $smarty; //www.zuimoban.com $kindeditor=" $input_value var ue = UE.getEditor(&#39;editor&#39;); UE.getEditor(&#39;editor&#39;).focus(); "; //zuimoban $smarty->assign(&#39;FCKeditor&#39;, $kindeditor); } 3、修改admin/templates/pageheader.htm 将: {insert_scripts files="../js/transport.js,common.js,../js/utils.js"} 替换为: <script type="tex 立即下载

相关推荐

ecshop更换百度编辑器

ecshop更换百度编辑器,解决js冲突..

修改ECSHOP后台编辑器的表情

ECSHOP后台的商品编辑和文章编辑使用的是fckedtor编辑器,此编辑器的工具条工具栏是可以自定义的,ECSHOP默认使用的是Normal ,属于中档功能,下面我们来改一下设置,让fckedtor的全部功能都显露出来。 打开/admin/includes/lib_main.php。 1 6 function create_html_editor($input_name, $inp

Peter的游击战 800

php-在线HTML编辑器:kindeditor、FCKeditor

php-在线HTML编辑器:kindeditor、FCKeditor

ECShop 将FckEditor编辑器升级或更换成CKEditor

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33672109的博客 343

适合PHP5.3版本以上的ecshop

闲来重新温习一下php的电子商务程序,ecshop很适合国内用,但是不支持PHP5.3以上的版本了,最近重新安装的ecshop把所有抛错的内容进行的修正,同时调整(del)了与他们的API接口地址。给后来者一个方便吧。

倍福Beckhoff运动控制功能块实战解析:从MC_ReadActualPosition到MC_GearInVelo

本文深入解析倍福(Beckhoff)TwinCAT运动控制功能块,从基础的MC_ReadActualPosition、MC_Power等轴状态读取与使能操作,到MC_MoveAbsolute、MC_MoveRelative等单轴定位指令,并重点剖析了用于动态速度同步的核心功能块MC_GearInVelo在飞锯等场景的应用。文章结合实战经验,详细介绍了齿轮耦合、电子凸轮(MC_CamIn)等高级同步功能的参数配置、调试技巧及常见问题,旨在帮助工程师快速掌握倍福运动控制工具箱,实现复杂的同步工艺。

transformer2023的博客 993

ECShop替换FCKeditor编辑器为KindEditor

为什么80%的码农都做不了架构师?>>> ...

weixin_33766805的博客 261

LIN 协议测试

如下图,使用PicoScope示波器抓取报文Id为0x18的波形,数据场Byte1的长度为519.994μs,Byte1共10bit,计算位时间:tBit= 519.994/10 = 51.9994μs,符合预期。■ 唤醒信号是一个250μs到5ms的显性电平,发送唤醒信号的节点发送唤醒信号后150ms~250ms没有收到其他节点的唤醒信号,发送唤醒信号的节点发送新的唤醒信号。对于LIN主节点,检查发送的帧头长度是否符合设计要求,对于LIN从节点,检查从节点能否正确响应设计范围之内的帧头长度。

m0_63902994的博客 5947

ecshop将编辑器更换为kindeditor

由于ecshop原版fckeditor编辑器过于陈旧,就有想法要更新编辑器,最开始想到的是

YANYAN0916的专栏 2050

如何用Python实现SPEI指数计算?从数据准备到结果可视化完整指南

本文提供了一份完整的Python实现SPEI指数计算指南,涵盖从数据准备、潜在蒸散量计算到结果可视化的全流程。详细介绍了使用Thornthwaite方法计算PET、拟合三参数log-logistic分布以及标准化转换的核心算法,并提供了模块化代码和可视化方案,帮助用户构建可复用的干旱分析工具。

cola5的博客 274

解决屏幕不亮难题:慷智SerDes DE信号极性配置避坑指南

本文深入探讨了基于慷智AIM95x系列SerDes芯片的嵌入式显示系统开发中,因DE信号极性配置不匹配导致屏幕不亮的典型故障。文章详细解析了DE信号的核心作用与极性定义,提供了慷智SerDes芯片中DE极性寄存器的具体配置方法与调试记录,并给出了从隔离问题、对比时序到波形验证的系统性排查流程,帮助工程师快速定位并解决此类隐蔽问题。

weixin_29185493的博客 150

ecshop编辑器FCKeditor修改成KindEditor编辑批量上传图片

ecshop一直使用的编辑器是fck,这个不用多说,相信很多朋友用的很悲剧吧,特别是图片不能批量上传图片。 今天小编就分享一下怎么换掉fck,放上实用的kindeditor,最新ecshop版本的哦。方法如下: 1、官方网站下载最新版kindeditor 现在最先版本的是:kindeditor4.1.4,官方网址:http://www.kindsoft.net 2、上传解...

dianjian2844的博客 239

自考计算机系统原理(第六章计算机系统概论)-13015

名词解释 I/O 硬件 I/O软件 用户空间I/O软件 内核空间I/O 软件 系统调用处理程序 系统调用服务例程 设备驱动程序 中断服务程序 系统级1/O函数 虚拟文件系统 文件描述符 文件元数据 流缓冲区 索引节点 目录文件 目录项 系统打开文件表 磁盘高速缓存 高速缓存 RAM I / O 控制方式 程序直接控制I/O 就绪状态 中断控制I/O 中断屏蔽字 多重中断 中断嵌套 DMA 方式 DMA 控制器 设备控制器 I/O端口 控制端口 数据端口 状态端口 I/O 地址空间 独立编址方式 统一编址方

qq_23872947的博客 1157

ecshop更换升级FCKeditor编辑器到Kindeditor,支持图片批量上传,和百度地图添加

收藏下,没有测试 ecshop更换升级FCKeditor编辑器到Kindeditor,支持图片批量上传,和百度地图添加的功能,kindeditor是个不错的编辑器。 1,首先下载kindeitor最新版放到includes目录 2,删除 admin/goods.php 大约107行  include_once(ROOT_PATH . 'includes/fckedit

快乐学习,快乐工作! 1640

基于Playwright和反爬虫规避技术的雪球股票讨论数据采集方案

随着量化投资和社交投资的兴起,雪球作为中国领先的投资社交平台,其用户讨论数据成为研究市场情绪的重要来源。本文将详细介绍如何使用最新的Playwright技术和反爬虫规避策略,构建一个高效、稳定的雪球股票讨论爬虫系统。本文详细介绍了基于Playwright的雪球股票讨论爬虫实现方案,涵盖了从基础配置到高级反爬虫策略的各个方面。AI驱动的反爬虫对抗更智能的请求调度算法区块链技术在数据溯源中的应用联邦学习在数据采集中的运用。

2201_76125261的博客 1021

C#操作MySQL从入门到精通(3)——新建数据库、新建表

我们要首先新建一个数据库,并且在数据库中新建一系列的表来管理数据库。

qq_34059233的博客 957

更换ECSHOP默认编辑器为KindEditor

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33845881的博客 141

16、AI与无人机助力紧急器官移植及医疗物资运输

本文探讨了AI与无人机(UAV)集成模型在紧急器官移植和医疗物资运输中的应用。传统运输方式受限于交通、时间和环境因素,而基于图神经网络(GNN)的AI-UAV系统可实现高效、智能、全天候的医疗物资配送,具备实时温湿度监控、自动导航和适应复杂地形等优势。文章分析了该模型在血液、器官运输中的关键作用,展示了其在澳大利亚、中国、美国等国的实际应用案例,并通过表格与流程图说明运作机制。同时,文章还探讨了技术、法规和社会层面的挑战及应对策略,展望了未来技术融合、应用拓展和国际合作的发展趋势,凸显其在全球医疗物流中的广

lll78的博客 103

ecshop编辑器升级kindediter编辑器的方法

1.  前往kindeditor官网下载最新版的压缩包。此是官网地址:http://kindeditor.net。2. 将将压缩包解压后重新命名为kindeditor,将解压的文件夹拷贝至安装根目录下的includes文件夹。3. 打开 “admin/goods.php" 文件,大约在107行出的 include_once(ROOT.PATH . 'includes/fckeditor/fcked...

C_Rubit的博客 666

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

Ueditor、FCKeditor、Kindeditor编辑器漏洞

UEditor是由百度web前端研发部开发的所见即所得的开源富文本编辑器,具有轻量、可定制、用户体验优秀等特点。Ueditor、FCKeditor、Kindeditor编辑器漏洞

网安君的博客 7315

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

Ecshop后台fckeditor改为kindeditor

fckeditor 太恶心了 先换成kindeditor吧.  (其实我想换成ueditor) 1  kindeditor 下载地址 http://kindeditor.net/down.php 目前版本为  4.1.10 (2013-11-23) 貌似也该升级了.   不知道为啥. 在国内下载显示地址失效. 百度网盘离线也不行.  下载后把里面的 asp、asp.net、jsp和exampl

Crazy 2313

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

在线HTML编辑器:kindeditor、FCKeditor

将editor文件直接“复制”到day21目录即可。 在需要的编辑器的页面,引入如下文件: &lt;script charset="utf-8" src="js/editor/kindeditor-min.js"&gt;&lt;/script&gt; &lt;script charset="utf-8" src="js/editor/lang/zh_CN.js"&gt;&l

qq_37171379的博客 388

ecshop编辑器fckeditor换百度ueditor编辑器教程

1、下载uediter编辑器,解压上传目录uediter到根目录/includes/下   2、修改admin/includes/lib_main.php         /**   * 生成编辑器   * @param   string  input_name  输入框名称   * @param   string  input_value 输入框值   */...

weixin_34375251的博客 200

js引入kindeditor富文本编辑器的使用

1. 在官网上下载KindEditor文件,可以删掉不需要要到的jsp,asp,asp.net和php文件夹。接着把文件夹放到项目文件目录下。 2. 修改html文件,在页面引入js文件: <script type="text/javascript" src="./kindeditor/kindeditor-all.js"></script> <script type="text/javascript" src="./kindeditor/lang/zh-CN.js"

天天向上 2315
上一篇: ecshop更换升级FCKeditor编辑器到Kindeditor,支持图片批量上传,和百度地图添加
下一篇: 网站克隆
_lcy
博客等级 码龄14年 2粉丝 11原创
评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值