无刷新网页[数据岛技术应用]

基于MATLAB的多无人机多任务调度算法——CBBA带时间窗 本文将介绍基于MATLAB的CBBA算法,并对其进行改进,加入时间窗概念,以提高多无人机系统的调度效率和性能。时间窗用于限定任务的执行时间范围,以避免任务执行时间过长或过短导致的问题。具体而言,我们为每个任务设置一个允许的最早开始时间和最晚结束时间,并在任务分配的过程中考虑这些时间约束。在多无人机系统中,需要将若干个任务分配给不同的无人机完成,以实现高效的任务执行。以上是关于基于MATLAB的多无人机多任务调度算法CBBA带时间窗的简要介绍和源代码实现。多无人机系统的调度问题。 阅读详情

有些时候,只是需要更新页面的一个部分甚至只是更新中间的几个数据却需要从服务器DOWN整个页面,导致各种资源的浪费。

使用数据岛技术可以很好的解决这个问题:

通过定时器或用户事件触发数据岛(XML对象)象服务器获取数据,在数据获取完成后,适时更新相关数据。

示例
HTML部分:
<xml id=xmlData src="http://localhost/WebService/LoadData/FeaturedService.asmx/GetScores"></xml>

<div id=divDataList>
<table datasrc=#xmlData width="500"  border="0" width="70%"   cellspacing="1" cellpadding="1" showalign="left" style="line-height: 140%">
<thead>
<tr bgcolor="#0033CC" style="color: #ffffff">
<td width="13%" nowrap>赛事名</td>
<td width="3%" nowrap>對賽隊伍</td>
<td width="25%">比分</td>
<td width="10%" nowrap>對賽隊伍</td>
<td width="25%">半場</td>
<td width="13%" nowrap>比赛状态</td>
</tr>
</thead>
<tbody>
<tr bgcolor="#0033CC" style="color: #ffffff">
<td width="13%" nowrap><span datafld=MatchName></span></td>
<td width="13%" nowrap><span datafld=MatchTime></span></td>
<td width="11%"  nowrap><span datafld=HostTeam></span></td>
<td width="3%" nowrap><span datafld=MatchScore></span></td>
<td width="25%"><span datafld=CustomerTeam></span></td>
<td width="10%" nowrap><span datafld=HalfScore></span></td>
<td width="25%"><span datafld=MatchState></span></td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<div id=divWaitMsg>
请稍候,正在更新数据
</div>
<script language=javascript>
function ShowDataList()
{
divDataList.style.display="";
divWaitMsg.style.display="none";
setTimeout(GetNewData,10000);
}
function GetNewData()
{
divDataList.style.display="none";
divWaitMsg.style.display="";
xmlData.src=xmlData.src;
}
</script>

WebService 部分:
[WebMethod]
  public string GetScores()
  {
   string connectionString="Server=Root;database=kakai;User id=sa;password=201080";
   SqlConnection conn;
   conn=new SqlConnection(connectionString);
   string SQL;
   SqlDataAdapter Adpt;
   DataSet ds;
   SQL="Select MatchName,MatchTime, HostTeam,CustomerTeam,MatchScore,HalfScore,MatchState From ShowScores where MatchDate='11月8日'";
   Adpt=new SqlDataAdapter(SQL,conn);
   ds=new DataSet();
   Adpt.Fill(ds,"ShowScores");
return ds.Getxml();
}

新技术经历了大致几个阶段: 一、在HTML文件头里增加一个键,使该页面在设定的时间后跳转到指定的页面(包括自身);

例如:


二、使用框架然后在JS脚本里定时刷新框架内容。

上面两种方式都会重新加载页面,即刷新,给人的感觉不是很好!于是无刷新技术出现了。

三、是对第二种方式的一种变通。

即将众多框架中的一个长宽设置为0,使其不可见,然后通过脚本定时刷新该隐藏框架内容,再将该框架内容“写”到可浏览的框架里。早期的聊天室大多使用了这种技术。

真正意义上实现无刷新技术的还是以下两种技术,它们甚至可以实现局部刷新:

四、xmlHttp技术,可以通过xmlHttp访问asp页面、aspx页面、WebService等。




五、WebService,使用WebService.htc组件访问Web服务。

var OBJ;
function init(obj,op,id)
{
OBJ=obj;
?OBJ.useService("admin/DataOperation.asmx?WSDL","getBody");
?OBJ.getBody.callService(show,op,id);
}

function show(result){
OBJ.innerHTML=result.value;
}

六、Remoting,使用Remoting也可以实现无刷新技术。因为Remoting组件可以提供包括Http在内的多种访问方式,当作为Http访问时相当于一个WebService。

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

相关推荐

Python 打包与发布陷阱:如何用 setuptools 和 PyInstaller 生成跨平台可执行文件?

使用。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 1207

无刷新网页(收藏)

在.net中实现无刷新网页技术,我所知的目前有三个解决方案.(转载)1.xml+webservice.htc+DHTML2.数据岛技术3.类似于第一种,只不过数据源不是xml.对于第一个方案,我是在csdn上搜索到一个帖子里看到的.可惜我对xml不是很熟.但是我参考了其中的思路,然后结合webservice behavior的特征:webservice行为不支持DataSet,DataTa...

weixin_30906701的博客 267

python爬虫自动下载网页链接

需求分析 今天遇到一个简单的需求,需要下载澳大利亚电力市场NEM日前市场的发电商报价数据(http://nemweb.com.au/Reports/Current/Next_Day_Offer_Energy/),页面观感是这样的: Ctrl + F 一下,看到一共有395个zip链接。于是就想着用python爬虫自动下载。这个网页很简单,没有验证码,甚至不需要登录,因此自动下载的pytho...

da_kao_la的博客 1万+

无刷新网页——数据岛技术应用

有些时候,只是需要更新页面的一个部分甚至只是更新中间的几个数据却需要从服务器DOWN整个页面,导致各种资源的浪费。使用数据岛技术可以很好的解决这个问题:通过定时器或用户事件触发数据岛(XML对象)象服务器获取数据,在数据获取完成后,适时更新相关数据。示例HTML部分:http://localhost/WebService/LoadData/FeaturedService.asmx/GetScore

lee576的专栏 2086

别再只会插卡了!用示波器实测SIM卡上电时序与通信波形(附故障排查)

本文深入解析了SIM卡通信的电气信号与时序规则,通过示波器实测波形揭示SIM卡上电时序与通信协议的关键细节。从VCC、CLK、RST、DATA四路信号的协同工作,到ATR(Answer to Reset)的解析,再到常见故障的波形诊断与排查方法,为硬件工程师提供了实用的调试指南。文章还分享了高级调试技巧与现代化工具链搭建建议,帮助提升物联网设备SIM卡通信的可靠性与效率。

weixin_42567279的博客 327

腾讯云TDSQL MySQL版 - 开发指南兼容性

语言结构 分布式实例支持所有 MySQL 使用的文字格式,包括: String Literals Numeric Literals Date and Time Literals Hexadecimal Literals Bit-Value Literals Boolean Literals NULL Values String Literals String Literals 是一个 bytes 或者 characters 的序列,两端被单引号'或者双引号"包围,TDSQL MySQL版

weixin_43872058的博客 909

Ajax 重新绑定 webgrid 数据,利用AJAX与数据岛实现无刷新绑定

利用AJAX与数据岛实现无刷新绑定更新时间:2007年03月07日 00:00:00 作者:首先我们今天要用到的是Ajax.NETProfessional,您可以从http://www.schwarz-interactive.de/获取关于AJAX.NET的相关信息。其次还需要知道XML数据岛的相关知识。下面我们先来看一个简单的绑定例子:第一步先确定XML数据源JohnSmithVis...

weixin_42109732的博客 205

分支界定法(branch and bound)与背包问题的代码实现

分支界定法(branch and bound)与背包问题的代码实现 LastEditTime: - 2021.2.3 不卖茶的吴龙茗茶 分支界定法是一种在整数规划中常用的算法,其主要思想为将大问题分割成小问题进行求解。分支界定法是围绕着一个二叉树进行的,以背包问题为例: 假设小明有一个背包,其总的容积为30,小明有三件东西可以带,三件东西的体积分别为:10,15,20。求问小明如何能够在背包中装下更大体积的物品? .

小吴同学的小屋 1885

利用Ajax与数据岛实现无刷新绑定

首先我们今天要用到的是Ajax.NET Professional ,您可以从http://www.schwarz-interactive.de/ 获取更多的信息然后还需要知道Xml数据岛,先来看一个简单的绑定例子: 第一步先确定XML数据源xml ID="xmlData" name="xmlData">root>    METADATA>        AUTHOR>John SmithAUT

思想决定人生,态度改变一切 1953

【Python】-- 趣味代码 - 发牌游戏

Python -- 趣味代码 - 发牌游戏

银尘博客 351

49、非合作目标运动参数估计与状态滤波方法研究

本文研究了非合作空间目标的运动参数估计与状态滤波方法。通过分析目标的章动运动特性,建立了运动方程,并分别提出了基于最小二乘法的质心运动参数估计方法和旋转运动参数估计方法。同时,设计了误差状态卡尔曼滤波器(ESKF)用于姿态滤波和角速度估计,以提高估计精度。仿真实验验证了所提方法的有效性,能够准确估计目标的运动参数和状态信息,为在轨服务提供了技术支持。

gpt4scribbler的博客 89

网页数据的实时刷新

网页数据的实时刷新本来是打算在WEB页面上实现这样的功能:例如网页上有多个按钮,按钮1,按钮2,按钮3等按钮1的响应比较耗时,如何能够做到点击了按钮1之后,不用等待其响应,就可以再点击其他按钮,而按钮1响应结束之后会把结果刷出来?仔细一想,这是不可能的!这种要求对winform的程序而言非常简单,对web就难了。不等待按钮1的响应返回,只能是异步实现,开启线程或者BeginIn

Home Of HappyBear 1万+

从零开始学习CANoe(十六)—— Graphics

Graphics是一种以时间轴为横坐标,符号值为纵坐标的显示分析方法,相对于Trace来说,更直观的观察出信号的跳变

蚂蚁小兵 9193

利用AJAX与数据岛实现无刷新绑定

利用AJAX与数据岛实现无刷新绑定作者: ,  出处:博客园, 责任编辑: 叶江, 2006-03-29 15:03  首先我们今天要用到的是Ajax.NET Professional ,您可以从http://www.schwarz-interactive.de/ 获取关于AJAX.NET的相关信息。其次还需要知道XML数据岛的相关知识。下面我们先来看一个简单的绑定例子

SmartJavaer的专栏 1001

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

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

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

网页数据如何实现实时刷新?

来源商业新知网,原标题:精讲网页数据实时刷新实现 本文仅为学技术而简单举例,后端框架是Django,具体业务逻辑是否合理可以不用管,下方是工作中需要实现的需求 自动化程序脚本运行的三种任务状态: 1、未执行 2、执行成功 3、执行失败 任务状态在网页前端实时展示,需要每隔一段时间请求数据库中的状态数据字段为webtask_stu,并返回前端展示 两种思路: 1、前端轮...

4239

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

JS 页面刷新/数据刷新

在网页开发中,数据修改(删除/添加)后,怎么实现立即刷新呢? 在JS中,刷新有两种方式:页面整体刷新和数据的局部刷新。 页面整体刷新:[code="js"]location.reload(true);[/code] 每次运行到此命令,都会刷新整个页面,当然也会实现数据的刷新。但是采用页面刷新,会出现一下几个问题: 首先,屏幕会出现短暂的白屏,也...

tiantianyuqing的博客 7997

用iframe实现的网页局部刷新

    网上经常有人想要实现不刷新从服务器取数据的需求。本人理解就是局部刷新或者是隐藏刷新。有点象“偷偷摸摸”地从服务器拿数据而不让用户发觉的意思。本人想要实现局部刷新的思路是出于以下考虑的:    当用户点击一个应用菜单后,要将此菜单代码保存在数据库中,而且要在“最近使用过的菜单”中显示出来。因为应用菜单项非常多,刷新一次要消耗相当多的资源,所以就想只刷新“最近使用过的菜单”,因为只取前十项,所

\\\布谷鸟///的专栏 1万+

flask 刷新 html 网页

flask 刷新 html 网页 pip install flask pip install livereload home.html <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>刷新网页</title> </head> <body> &lt

weixin_44493841的博客 1592

利用Ajax与数据岛实现无刷新绑定 shang515

首先我们今天要用到的是Ajax.NET Professional ,您可以从http://www.schwarz-interactive.de/ 获取更多的信息然后还需要知道Xml数据岛,先来看一个简单的绑定例子: 第一步先确定XML数据源xml ID="xmlData" name="xmlData">root>    METADATA>        AUTHOR>John SmithAUT

ZFIVE5 1158
上一篇: Wap开发FAQ大全
下一篇: WAP上网实现步骤
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值