dwz多层弹出框刷新问题

dwz .net 简单分页 表头排序、查询 立即下载
<%@page import="java.util.Date"%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>
<script language="javascript">
  function selectRowRevising(){
     var counts = jQuery(":checkbox[name='ids']:checked").length;
if(Number(counts)==1){
   var item = $("input[name='ids'][checked]").get(0);
var terminalType = item.value;
if(Number(terminalType)==1){
      $("#aediting").attr("href","demo/dooropennum/demo_pageupdate_telephone.html?uid={sid_user}");
}else if(Number(terminalType)==2){
 $("#aediting").attr("href","demo/dooropennum/demo_pageupdate_mobilephone.html?uid={sid_user}");
}else if(Number(terminalType)==3){
  $("#aediting").attr("href","demo/dooropennum/demo_pageupdate_mobileterminal.html?uid={sid_user}");
}
}else if(Number(counts)>1){
   alertMsg.error('请选择一条记录进行修改!');
return false;
}/*else{
   alertMsg.error('请选择信息!');
return false;
}*/
  }

   $(document).ready(function(){
     $("table tr").live("click",function(){
     $tr = $(this);
     var resultinfo = $(this).find("td:eq(2)").text();
  if(resultinfo&&"软终端"==resultinfo.trim()){
  $("#reviseTerminal").css("visibility","visible");
 //$input.attr("checked",!$input.is(":checked"));
  }else {
 $("#reviseTerminal").css("visibility","hidden");  
}
      }); 
       $("img[name='upOpenNum']").die().live("click",function(event){
                var $thp = $(this).parent();
while($thp[0].tagName != "TR"){
   $thp = $thp.parent();
};
var selectTenOpennumId = $(this).attr("keyidtargeting");
$(this).blur();
if($thp.prev()!=null&&$thp.prev().attr("rel")!=null){
 var prevTenOpennumId = $thp.prev().attr("rel");
 $.ajax({
   url : "<%=basePath%>/management/security/doorOpenNum/upOpenNum",
           type : "post",
           dataType : "json",
           data : "prevTenOpennumId="+prevTenOpennumId+"&selectTenOpennumId="+selectTenOpennumId+"&tenId="+${tenId}+"&date="+new Date(),
           success : function(rlt) { //若Ajax处理成功后的回调函数,text是返回的页面信息
                 if(rlt.rlt){
                     $thp.after($thp.prev());
                     alertMsg.correct(rlt.msg);
                 }else{
                     alertMsg.error(rlt.msg);
                 }
           },async: false
    }); 
      event.stopPropagation();
    } 
});

$("img[name='downOpenNum']").die().live("click",function(event){
var $thp = $(this).parent();
while($thp[0].tagName != "TR"){
   $thp = $thp.parent();
};
var selectTenOpennumId = $(this).attr("keyidtargeting");
$(this).blur();
  if($thp.next()!=null&&$thp.next().attr("rel")!=null){
  var nextTenOpennumId = $thp.next().attr("rel");
 $.ajax({
           url : "<%=basePath%>/management/security/doorOpenNum/downOpenNum",
           type : "post",
           dataType : "json",
           data : "nextTenOpennumId="+nextTenOpennumId+"&selectTenOpennumId="+selectTenOpennumId+"&tenId="+${tenId}+"&date="+new Date(),
           success : function(rlt) { //若Ajax处理成功后的回调函数,text是返回的页面信息
                 if(rlt.rlt){
                     $thp.before($thp.next());
                     alertMsg.correct(rlt.msg);
                 }else{
                     alertMsg.error(rlt.msg);
                 }
           }
    }); 
   event.stopPropagation();
    }
});

  $(".toolBar :radio").click(function (){
    $.ajax({
           url : "<%=basePath%>/management/security/doorOpenNum/orderRing",
           type : "post",
           dataType : "json",
           data : "ringOrder="+$(this).val()+"&tenId="+${tenId}+"&date="+new Date(),
           success : function(rlt) { //若Ajax处理成功后的回调函数,text是返回的页面信息
                 if(rlt.rlt){
                     alertMsg.correct(rlt.msg);
                 }else{
                     alertMsg.error(rlt.msg);
                 }
           }
    }); 
         });     
      $("a[name='isenableclicking']").die().live("click",function(){
      //alert($(this).parent().parent().html());
          var isEnable = $(this).attr("isenable");
          var tenOpennumId = $(this).attr("keyidtargeting");
          if(isEnable == "0"){
             isEnable ="1";
             $(this).parent().empty().append("启用 <a style=\"color:red;text-decoration:none\" name=\"isenableclicking\" isenable=\"1\" keyidtargeting=\""+tenOpennumId+"\">禁用</a>");
          }else if(isEnable == "1"){
             isEnable ="0";
             $(this).parent().empty().append("禁用 <a style=\"color:blue;text-decoration:none\" name=\"isenableclicking\" isenable=\"0\" keyidtargeting=\""+tenOpennumId+"\">启用</a>");
          }
          $.ajax({
           url : "<%=basePath%>/management/security/doorOpenNum/changingEnable",
           type : "post",
           dataType : "json",
           data : "tenOpennumId="+tenOpennumId+"&isEnable="+isEnable+"&tenId="+${tenId}+"&date="+new Date(),
           success : function(rlt) { //若Ajax处理成功后的回调函数,text是返回的页面信息
                 if(rlt.rlt){
                     alertMsg.correct(rlt.msg);
                 }else{
                     alertMsg.error(rlt.msg);
                 }
           }
    }); 
    divSearch($("#pagerFormDoorOpenNum"),'jbsxBox_DoorOpennum');
      });
 });
  
function dooropennum_list_refresh(json){
  if(json){
if(json.statusCode==DWZ.statusCode.ok){
$.pdialog.reload("<%=basePath%>/management/security/doorOpenNum/opennumdetail/${tenId}",json,"detailDoorOpennumDialoging");
divSearch($("#pagerFormDoorOpenNum"),'jbsxBox_DoorOpennum');
if(json&&json.message){
  alertMsg.correct(json.message);
}
}else{
alertMsg.error(json.message);
}
   }else{
     $.pdialog.reload("<%=basePath%>/management/security/doorOpenNum/opennumdetail/${tenId}",json,"detailDoorOpennumDialoging");
divSearch($("#pagerFormDoorOpenNum"),'jbsxBox_DoorOpennum');
return true;
   }
}


function refreshBackDataDoorOpennumDetail(json){
        var tenId = $("#pageFormTenId").val();
        var basePath = "<%=basePath %>";
        $.ajax({
        url : "<%=basePath%>/management/security/doorOpenNum/opennumdetaildata/"+tenId,
        type : "post",
        dataType : "json",
        data : "tenId="+${tenId}+"&date="+new Date(),
        success : function(rlt) { //若Ajax处理成功后的回调函数,text是返回的页面信息
      if(rlt){
               $("#openNumDetailTBody").empty();
               for(var index=0;index<rlt.tenOpennumList.length;index++){
                  var item = rlt.tenOpennumList[index];
                  var dynamicHtml =
                       "<tr target=\"slt_uid\" rel=\""+item.id+"\" height=50px>"
                       +"<td>"+Number(index+1)+"</td>"
                       +"<td>"+item.doorOpennum.openNum
                       +"&nbsp;&nbsp;&nbsp;&nbsp; <img src=\""+basePath+"/styles/resource/js/themes/default/images/layout_button_down.gif\""
+" name=\"downOpenNum\" keyidtargeting="+item.id+"> &nbsp;&nbsp;" 
+" <img src=\""+basePath+"/styles/resource/js/themes/default/images/layout_button_up.gif\""
                    +"  name=\"upOpenNum\" keyidtargeting="+item.id+">"
                                        +"</td>"
                       +"<td>"; 
          if (item.doorOpennum.numberType=='1'){
   dynamicHtml +="手机";
  }else if (item.doorOpennum.numberType=='2'){
       dynamicHtml +="固话";
  }else if(item.doorOpennum.numberType=='3'){
      dynamicHtml +="软终端";
  }
                 dynamicHtml +="</td><td>";
                    if (item.isEnable=='1'){
  dynamicHtml +="启用 <a style=\"color:red;text-decoration:none\""
+"name=\"isenableclicking\" isenable="+new String(item.isEnable)+
+" keyidtargeting="+item.id+">禁用</a>";
              }else if (item.isEnable=='0'){
dynamicHtml +="禁用 <a style=\"color:blue;text-decoration:none\""
+"name=\"isenableclicking\" isenable="+new String(item.isEnable)
+" keyidtargeting="+item.id+">启用</a>";
  }
                       dynamicHtml +="</td>"
                       +"<td>"+item.addDate+"</td>"
                       +"</tr>";
                   $("#openNumDetailTBody").append(dynamicHtml);
                   var $p=$(document);
                      $('table.list',$p).cssTable();
              }               
                }
              }
    }); 
    divSearch($("#pagerFormDoorOpenNum"),'jbsxBox_DoorOpennum');
   }
</script>
<form id="pagerForm" method="post" action="demo_page1.html">
    <input type="hidden" id="pageFormTenId" value="${tenId}" />
<input type="hidden" name="status" value="${param.status}"> <input
type="hidden" name="keywords" value="${param.keywords}" /> <input
type="hidden" name="pageNum" value="1" /> <input type="hidden"
name="numPerPage" value="${model.numPerPage}" /> <input type="hidden"
name="orderField" value="${param.orderField}" />
</form>


<div class="pageHeader">
<form onsubmit="return validateCallback(this, dialogAjaxDone);"
action="<%=basePath %>/management/security/doorOpenNum/opennumdetail/${tenId}"
method="post" id="pagerFormOpennumDetail">
<div class="searchBar">
<table class="searchContent">
<tr>
<td colspan=3>
<div class="panelBar">
<ul class="toolBar">
<shiro:hasPermission name="DoorOpennum:save">
<li><a class="add"
href="<%=basePath %>/management/security/doorOpenNum/create/${tenId}"
target="dialog" rel="dlg_pagelog" title="添加开门号码"><span>添加</span>
</a>
</li>
</shiro:hasPermission>
<shiro:hasPermission name="DoorOpennum:delete">
<li><a class="delete"
href="<%=basePath%>/management/security/doorOpenNum/delete/{slt_uid}"
target="ajaxTodo" title="确定要删除吗?"
callback="dooropennum_list_refresh"><span>删除</span>
</a>
</li>
</shiro:hasPermission>
<shiro:hasPermission name="DoorOpennum:edit">
<li><a class="edit"
href="<%=basePath%>/management/security/doorOpenNum/update/{slt_uid}"
style="visibility:hidden" id="reviseTerminal" width="530"
height="340" target="dialog" rel="dlg_page_editing"
title="修改开门号码" callback="dooropennum_list_refresh"><span>修改</span>
</a>
</li>
</shiro:hasPermission>
<shiro:hasPermission name="DoorOpennum:edit">
<li><a><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置振铃方式
<input type="radio" name="ringOrder" value="0"
<c:if test="${tenementInfo.ringingOrder=='0'}">checked</c:if> />同振
<input type="radio" name="ringOrder" value="1"
<c:if test="${tenementInfo.ringingOrder=='1'}">checked</c:if> />顺振</span>
</a></li>
</shiro:hasPermission>
</ul>
</div></td>
</tr>
</table>
</div>
</form>
</div>
<div class="tabsContent" layoutH="60">
<table class="list" width="100%" border=0 id="listtable">
<thead>
<tr>
<th width="10%" align="center">序号</th>
<th width="30%">开门号码</th>
<th width="20%">号码类型</th>
<th width="15%">号码状态</th>
<th align="center" width="15%">添加时间</th>
</tr>
</thead>
<tbody id="openNumDetailTBody">
<c:forEach var="item" items="${tenOpennumList}" varStatus="status">
<tr target="slt_uid" rel="${item.id}" height=50px>
<td>${status.index+1}</td>
<td>${item.doorOpennum.openNum}&nbsp;&nbsp;&nbsp;&nbsp; <img
src="<%=basePath %>/styles/resource/js/themes/default/images/layout_button_down.gif"
name="downOpenNum" keyidtargeting="${item.id}"> &nbsp;&nbsp; <img
src="<%=basePath %>/styles/resource/js/themes/default/images/layout_button_up.gif"
name="upOpenNum" keyidtargeting="${item.id}"></td>
<td><c:if test="${item.doorOpennum.numberType=='1'}">
手机
</c:if> <c:if test="${item.doorOpennum.numberType=='2'}">
固话
</c:if> <c:if test="${item.doorOpennum.numberType=='3'}">
软终端
</c:if></td>
<td><c:if test="${item.isEnable=='1'}">
启用 <a style="color:red;text-decoration:none"
name="isenableclicking" isenable="${item.isEnable}"
keyidtargeting="${item.id}">禁用</a>
</c:if> <c:if test="${item.isEnable=='0'}">
禁用 <a style="color:blue;text-decoration:none"
name="isenableclicking" isenable="${item.isEnable}"
keyidtargeting="${item.id}">启用</a>
</c:if></td>
<td>${item.addDate}</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
LLC谐振变换器恒压恒流双竞争闭环控制simulink仿真(附说明文档) 内容概要:本资源是一套面向电力电子与智能控制领域的综合性科研仿真资料合集,核心聚焦于LLC谐振变换器的恒压恒流双竞争闭环控制策略设计与Simulink建模仿真实现,涵盖半桥LLC、双向全桥LLC等拓扑结构的调频闭环仿真,并提供详尽的说明文档与PPT辅助材料。资源体系不仅深入呈现LLC变换器的动态响应与控制逻辑,还扩展至双有源桥(DAB)变换器的软开关协同优化、最小应力控制、EPS调制策略及新扩展移相角优化等前沿技术,同时集成三相PWM整流器在电网不平衡条件下的功率平衡控制、VOC+SVPWM双闭环控制等典型应用场景。此外,资源包涵盖状态估计(如EKF、UKF、PF)、微电网经济调度、卡尔曼滤波融合、神经网络控制、PID优化、储能系统管理等多个交叉方向,特别强调对顶级EI期刊研究成果的高精度复现,旨在帮助科研人员快速掌握先进控制算法的核心思想与仿真实现方法。; 适合人群:电气工程、自动化、电力电子、新能源科学与工程等相关专业的硕士博士研究生、高校科研人员,以及从事新能源变换器、智能电网、电动汽车、微电网系统研发的工程技术人员。; 使用场景及目标:① 深入理解LLC与DAB变换器的闭环控制机理,掌握恒压恒流切换、软开关实现与损耗优化方法;② 利用Simulink平台构建复杂电力电子系统模型,开展动态性能分析与控制器参数整定;③ 复现高水平期刊论文中的先进控制策略,提升科研创新能力与论文发表竞争力;④ 支持毕业设计、科研课题、项目申报及工程原型开发中的仿真验证环节。; 阅读建议:建议结合提供的完整资源目录循序渐进学习,优先研读标注“顶级EI复现”的案例以获取权威方法参考,配合MATLAB/Simulink动手搭建模型,重点关注控制框图设计、调制逻辑实现与仿真结果对比,深入理解算法背后的物理意义与数学推导过程。 立即下载

相关推荐

双硬盘下Ubuntu 16.04与Win10双系统的安装

之前写过一个双系统安装过程,今天再次整理的原因是想重点强调双硬盘的区别。标红的一定要注意看,那就是我自己一步一步踏出来的坑啊...   基础步骤就不再重复,重点讲区别,需要看详细步骤的童鞋(或者你只有一个硬盘)请看我上一篇博客https://blog.youkuaiyun.com/weixin_40308540/article/details/80157444   区别:双硬盘和单硬盘的区别是什么呢?...

不吃包子 1122

dwz打开自定义dialog

在使用dwz界面的时候,需要打开自定义的dialog,并向其中传入参数,在网上搜索,大多数是使用lookup这这样的功能来实现lookup这样的功能太复杂看不懂,所以使用了jquery的方法来实现自定义参数的传递,代码如下整体的思路是这样的,给 指定一个id,然后给这个id添加绑定事件,然后在事件中传入自定义的url即可

佳泰生活 3931

2024高校网络安全管理运维赛题目--复现+题目+wp

官方writeup集思广益比较好的备份。

书山有路勤为径,学海无涯苦作舟 1321

dwz交互式弹窗处理

1.入口 选择2.js函数 var manid; function sel_man(manid){ alertMsg.confirm("是否将其设为审批人?", { okCall: function(){ $.ajax({ type: "post", url: "/boardroommanage/

hellorichen的专栏 2863

告别数据丢失焦虑:用Python手把手实现Reed-Solomon码(附完整代码)

本文详细介绍了如何使用Python实现Reed-Solomon纠错码(RS码),帮助开发者有效防止数据丢失。通过基础编解码实战、文件保护方案和高级性能优化技巧,读者可以轻松掌握这一前向纠错技术,应用于物联网、文件存储和网络传输等场景,提升数据可靠性。

weixin_42527160的博客 222

【从零开始入门unity游戏开发之——C#篇37】进程、线程、C# 中实现多线程有多种方案和async/await异步编程

进程、线程、C# 中实现多线程有多种方案和async/await异步编程

向宇的博客,专注php/web全栈 unity游戏开发,欢迎大家评论纠错 1467

DWZ弹窗用法总结

一、提示窗口 alertMsg.confirm('确定打开吗?',{ onCall:function(){ $.ajaxSettings.global = false; $.ajax({ type:"GET", url:"${basePath}grow/cream/deleteExp.do?expId=expId", contentType:"application/json; charset=utf-8", dataType:"json",

monk96的博客 838

matlab 受约束的 Delaunay 三角剖分【2025最新版】

matlab内置调用函数实现受约束的 Delaunay 三角剖分并将结果保存为STL文件

点云侠的博客 1875

关于alert弹出多次的问题

最近在项目发现一个bug,在layui-table里面的方法执行两次之后,点击一次绑定的按钮触发方法之后执行了多次该方法,我的体现是alert弹出多次,捣鼓需求之后发现是按钮触发多次绑定,导致点击一次按钮执行多次方法,解决方法是在按钮绑定点击时间之前,先解绑(unbind)以上描述可能不是很精确,还请谅解。...

qq_26702601的博客 7924

基于Python的异步爬虫实战:高效抓取同花顺概念板块数据

本文将详细介绍如何使用Python最新异步爬虫技术(requests-html+aiohttp+selenium)高效抓取同花顺概念板块数据。内容涵盖:反爬机制破解、动态页面渲染处理、数据解析存储等完整流程,并提供可复用的高性能爬虫代码实现。高性能:异步并发处理,QPS可达50+高可用:完善的异常处理机制可扩展:支持分布式部署增加历史数据回溯功能集成机器学习识别验证码构建实时数据推送系统。

2201_76125261的博客 1534

YOLO模型部署RK3588多核NPU并行加速完整教程:基于线程池的高性能AI推理实现

本教程详细介绍了如何在RK3588平台上实现多核NPU并行加速的AI推理方案。RK3588搭载3个独立NPU核心,总算力达6TOPS,支持单核、双核和三核三种工作模式。文章深入解析了NPU硬件架构特点,包括核心独立处理能力、内存带宽分配及多核心协作机制,并提供了C++代码示例展示核心负载均衡、任务调度和内存优化策略。通过线程池技术可以有效利用多核NPU并行计算能力,显著提升AI推理性能,特别适合高并发场景。教程还包含内存子系统的瓶颈分析和性能预估方法,为开发者提供完整的优化思路。

LXY_LOVE36的博客 794

dwz查找带回弹框无法分页

dialog的查找功能,navtab的查找功能很简单,但是dialog的查找功能真的费了我好几个晚上不停的测试和查找相关的资料,DWZ资料真的很少,给作者留言也石沉大海。一切都靠自己摸索。 id="pagerForm" rel="pagerForm" method="post" action="###" onsubmit="return dwzSearch(this, 'dialog');"

moliyiran的专栏 761

TI单芯片毫米波雷达1642代码走读(〇)——总纲

前言 近年来,自动驾驶行业发展如火如荼,雷达技术也逐渐从军工封闭圈走向了开放的市场。 毫米波雷达具有全天候探测能力,特别是在雨雪雾天气以及夜间都能可靠工作,并且探测距离相对其他车载传感器非常远,对运动目标非常敏感,价格还低廉,这些特性都使其成为自动驾驶感知层面不可或缺的一环。 现如今的雷达已经不仅仅局限于测距测速测角等传统的功能,雷达技术正在从感知走向认知、从宽带走向超宽带、从二维走向三维四维、从相控阵走向数字阵列、从单通道走向MIMO、从独立工作走向分布式协同、从分立组件走向射频数字一体化。MIMO

3万+

DWZ(JUI)多层弹窗查找带回实现

原功能BUG DWZ框架的查找带回能不能多层实现呢?查找带回弹窗页面里面再设置几个放大镜触发查找带回功能的弹窗?我一开始以为这样是可以的,如果我在第一层弹窗页面没有点过里面的放大镜,那么第一层页面的数据是可以带回的;但是,如果点击了第二层里的放大镜就无法带回数据。

DataVault2.0大数据的未来 2917

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

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

DWZ中刷新dialog的方案解决

在DWZ中进行ajax表单提交后,通过回调函数来返回状态结果,以及返回是否需要刷新父页的navTabId。 DWZ给我们提供了两个回调函数,一个是子窗口为navTab的navTabAjaxDone,一个是子窗口为dialog的dialogAjaxDone,但这两个回调函数都有同一样的缺陷:就是父窗口必须是navTab,也就是说只能刷新navTab,如果父窗口为dialog,则此父dialog是刷...

weixin_33709364的博客 354

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

DWZ弹框dialog分页功能不可用

正常的navTab页面分页可以使用,但是对话框就不行; 浏览器F12看network点击dialog对话框的分页时发送的竟然是父页面navTab的查询请求!问题就出在这: 这是父页面的分页代码: &amp;lt;div class=&quot;pagination&quot; targetType=&quot;navTab&quot; totalCount=&quot;${requestScope.page.total...

BugCounter的博客 889

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

dwz 个人学习笔记(二)dialog弹出框

个人学习笔记,有不对的或者你又更好的,随时联系我,我们共同学习。

阿昊的博客 3752

dwz关闭当前dailog窗口

dwz dialog链接扩展 A所指向页面将会在dialog 弹出层中打开,rel标识此弹出层的ID,rel为可选项。 Html标签扩展方式示例: 弹出窗口 或 打开窗口一 Max 属性表示此dialog打开时默认最大化, mask表示打开层后将背景遮盖. maxable: dialog 是否可最大化, minable:

zjlxrong的专栏 3911

dwz框架新建更新后对原表格刷新

前言:最近做的一个项目中使用了dwz,发现后来的表格在新增、更新后原来的表格不再刷新了,由于dwz用的不是很熟悉,但是隐约感觉,肯定标签中的rel标记出的问题。   首先:使用a标签弹出一个tab时,需要指定rel &lt;a href="&lt;c:url value='/management/message'/&gt;" target="navTab" rel="msgNav"&gt...

沉默王二 1434

dwz框架的table优化,增加选定行处理。

由于不知道作者是如何设计的,不值得dwz框架如何得到选定行的某列的值,看示例还得设这什么row,rel属性,不如改进一下,方便自己使用。 需要解决3个问题: 1、前台页面table自定义事件处理函数问题 2、前台页面自定义函数接收dwz框架传递过来的参数(实际上是tr的click事件,但是是在dwz框架里) 3、如果一个页面有两个table,他们之间相互影响吗? (这个问题实际上现在就可以

wxljmy的专栏 5481

DWZ局部刷新

DWZ局部刷新 这是dwz中局部刷新的源代码,虽然按照这样写,你的搜索功能能实现,并且实现了局部刷新,但是如果你的局部页面有添加或者修改功能,当你完成这些功能,再次刷新就会有问题,因为官方案例并没有实现这功能,按照我遇到的情况,当添加或者编辑完之后,layout1.html消失了,只剩下了list1.html页面,这样很定不行的,如何解决这个问题呢? 我们的需要把它返回到layout

June的专栏 3833

dwz增加info级别消息

dwz默认提供了error、success、timeout的信息级别输出,也就是说,当你在向服务端提交信息后,前台页面可以提供的弹出框主题可以为以上三种,但是有的时候,我们需要向用户提示一种信息,既不是error,也不是success,我们需要info,告诉用户而已,那么就需要进行一些改造。

沉默王二 4426
上一篇: 网站提取工具
下一篇: junit+selenium自动化测试
dreamingcoder259
博客等级 码龄16年 4粉丝 35原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值