.NET Petshop详解 petshop输出缓存设置

PetShop5.0最新最全版本包括全部源代码 PetShop是一个范例,微软用它来展示.Net企业系统开发的能力。业界有许多.Net与J2EE之争,许多数据是从微软的PetShop和Sun的PetStore而来。这种争论不可避免带有浓厚的商业色彩,对于我们开发人员而言,没有必要过多关注。然而PetShop随着版本的不断更新,至现在基于.Net2.0的PetShop5.0为止,整个设计逐渐变得成熟而优雅,却又很多可以借鉴之处。PetShop是一个小型的项目,系统架构与代码都比较简单,却也凸现了许多颇有价值的设计与开发理念。本系列试图对PetShop作一个全方位的解剖。 另外,PetShop非常适合初学者,从里面的案例可以学到最有价值的东西。 立即下载

 

 

文章来源:IT工程信息网  http://www.systhinker.com/html/72/n-11672.html

 

ASP.NET的输出缓存
衡量高性能、可缩放的 web 应用程序最重要的一个指标就是缓存了。 ASP.NET 提供了高性能的 web 应用程序的缓存功能 ,ASP.NET 有三种可由 Web 应用程序使用的缓存:
·  输出缓存 ,它缓存请求所生成的动态响应。
·  片断缓存 ,它缓存请求所生成的响应的各部分。
·  数据缓存 ,它以编程方式缓存任意对象。为支持这种缓存, ASP.NET 提供了全功能的缓存引擎,使程序员能够轻松地在请求间保留数据。
页的输出缓存是非常有用的。在海量的访问站点中,有些页面的访问频率占了非常大的比重,即使对这些页使用输出缓存很少的时间,也会减轻系统不少的负担,因为后面对这些页面的请求将不在执行创建该页的代码。
但是,这样显得不够灵活,页的请求可能的确是很多,然而在页面上我们缓存了所有的东西,无论是构造成本高还是构造成本低的部分。能否有一种可以缓存页的部分的数据呢?幸运的是 ASP.NET 提供了针对每个请求来创建或自定义该页的各部分。比如说我们可以对页面上构造成本很高的用户控件做片断缓存。
ASP.NET 缓存支持文件和缓存键依赖项,使开发人员可以使缓存项依赖于外部文件或其他缓存项。此项技术可用于在项的基础数据源发生更改时使该项无效。 ASP.NET 可以将这些项存储在 Web 服务器上或请求流中的其他软件上,例如代理服务器或浏览器。这可以使您避免重新创建满足先前请求的信息,特别是当在服务器上创建时要求大量处理器时间或其他资源的信息。
Petshop的页缓存设置
我们可以可通过使用低级别的 OutputCache API 或高级别的 @ OutputCache 指令来实现页的输出缓存。 启用输出缓存后,当发出对页的第一个 GET 请求时创建一个输出缓存项。随后的 GET 或 HEAD 请求由该输出缓存项服务,直到该缓存请求过期。 输出缓存还支持缓存的 GET 或 POST 名称 / 值对的变体。
输出缓存遵循页的过期和有效性策略。如果某页位于输出缓存中,并且有一个过期策略标记指示该页自缓存起 60 分钟后过期,则在 60 分钟后将该页从输出缓存中移除。如果此后接收到另一个请求,则执行页代码,并且可以再次缓存该页。
下面的指令在响应时激活输出缓存:
<%@ OutputCache Duration="60" VaryByParam="none"%>
Duration 和 VaryByParam 是必选参数,前者标识过期时间,后者表示 GET 或 POST 名称 / 值对的字符串。如果不使用该属性,可是设置为 none 。在这里我们还要说明一个参数 VaryByCustom ,使用这个参数,我们可以自定义输出缓存要求的任意文本。除了在 OutputCache 指令里面申明该属性之外,我们还得在应用程序的 global.asax 文件的代码声明块中,重写 GetVaryByCustomString 方法来为自定义字符串指定输出缓存的行为。
举一列来说:
<%@ OutputCache VaryByParam="none" VaryByCustom="CategoryPageKey" Location="server" Duration="43200" %>
这里的 VaryByCustom 定义的为 CategoryPageKey ,那么在 global.asax 里面我们必须定义 CategoryPageKey 这个字符创输出缓存的行为,见下面代码。
public override string GetVaryByCustomString(HttpContext context, String arg) {
              string cacheKey = "";
              switch(arg) {
                   case "CategoryPageKey":
                       if (Request.IsAuthenticated == true) {
                            cacheKey = "QQQ" + context.Request.QueryString["category_id"] + context.Request.QueryString["requestedPage"];
                       }
                       else {
                            cacheKey = "AAA" + context.Request.QueryString["category_id"] + context.Request.QueryString["requestedPage"];
                       }
                       break;
                   case "SearchPageKey" :
                       if (Request.IsAuthenticated == true) {
                            cacheKey = "QQQ" + context.Request.QueryString["search_text"] + context.Request.QueryString["requestedPage"];
                       }
                       else {
                            cacheKey = "AAA" + context.Request.QueryString["search_text"] + context.Request.QueryString["requestedPage"];
                       }
                       break;
                   case "ProductPageKey" :
                       if (Request.IsAuthenticated == true) {
                            cacheKey = "QQQ" + context.Request.QueryString["name"] + context.Request.QueryString["product_id"] + context.Request.QueryString["requestedPage"];
                       }
                       else {
                                 cacheKey = "AAA" + context.Request.QueryString["name"] + context.Request.QueryString["product_id"] + context.Request.QueryString["requestedPage"];
                       }
                       break;
                   case "ProductDetailsPageKey" :
                       if (Request.IsAuthenticated == true) {
                            cacheKey = "QQQ" + context.Request.QueryString["item_id"] + context.Request.QueryString["requestedPage"];
                       }
                       else {
                            cacheKey = "AAA" + context.Request.QueryString["item_id"] + context.Request.QueryString["requestedPage"];
                       }
                       break;
                   case "UserID" :
                       if (Request.IsAuthenticated == true) {
                            cacheKey = "UserID_In";
                       }
                       else {
                            cacheKey = "UserID_Out";
                       }
                       break;
              }
              return cacheKey;
         }
从上面对 CategoryPageKey 字符创所作的行为来看,当我们的请求页面中含有对特定的 category_id的某一分页显示的数据页的请求时,将调用缓存(自然是已经缓存了该页)。
下表列出了petshop的web应用程序的输出缓存设置。

ASP.NET WebForms
Cache setting
Duration
ControlHeader
<%@ OutputCache
         Duration="43200"         
         VaryByParam="none"
         VaryByCustom="UserID" %>
12 hours
Default
<%@ OutputCache
         Duration="43200"
         VaryByParam="none"
         VaryByCustom="UserID" %>
12 hours
Help
<%@ OutputCache
         Duration="43200" 
         VaryByParam="none"
         VaryByCustom="UserID" %>
12 hours
Category
<%@ OutputCache
         Duration="43200" 
         VaryByParam="none"
         VaryByCustom="CategoryPageKey " %>
12 hours
Product
<%@ OutputCache
         Duration="43200" 
         VaryByParam="none"
         VaryByCustom="ProductPageKey " %>
12 hours
ProductDetails
<%@ OutputCache
         Duration="43200" 
         VaryByParam="none"
         VaryByCustom="ProductDetailsPageKey " %>
12 hours
Search
<%@ OutputCache
         Duration="43200" 
         VaryByParam="none"
         VaryByCustom="SearchPageKey " %>
12 hours

显然 petshop 的 web 页面上部的 ControlHeader 是随着用户登陆的状态有关的,故其设置了 VaryByCustom 属性以来标识用户不同登陆状态的缓存版本。而 Category 页面由于可能被大量的访问,并且数据量很大,是十分有必要缓存的,但是由于数据的随机性很大,存在不同的版本,比如说是不同类别的 Category ,甚至不同的分页显示的数据页,在这里采用了 VaryByCustom 属性以缓存不同版本的页。
Petshop片断缓存
在前面我们提到 ASP.NET 可以提供页的局部数据的缓存,通常是一些构造代价较大的部分,诸如用户控件。在 petshop 里面,大量使用了用户控件(尤其是 .NET 示例程序 Duwamish7.0 使用了更多的用户控件,那些页面简直就是控件的拼装),用户控件的缓存设置方法和 aspx 页的缓存设置方法基本相同,在这里我们不再列出。只有 ControlHeader 控件使用了缓存设置,见上表。
文章来源:IT工程信息网  http://www.systhinker.com/html/72/n-11672.html
Codex 100个真实案例 - 用AI生成Blender 3D建模脚本(建模师要失业了?) 本案例将展示如何用 Codex 生成 Blender Python API(bpy)脚本,自动创建完整的 3D 模型。我们将从基础几何体开始,逐步实现布尔运算、材质设置、光照配置,最终完成一张精美桌子的 3D 建模——包括桌面、桌腿、倒角、木纹材质。还会实现参数化批量生成不同风格的桌子、渲染输出 PNG 图片、以及 360 度旋转动画。全程用自然语言驱动 Codex,让建模从"点鼠标"变成"说人话"! 阅读详情

相关推荐

链式中介效应结果解读:从Bootstrap置信区间到实践意义

本文深入解析链式中介效应结果的解读方法,从Bootstrap置信区间的应用到实践意义的阐述。通过实际案例展示如何分析总效应、直接效应和间接效应,并强调效应量评估的重要性。文章还提供了构建逻辑解释的三步法,以及敏感性分析和报告撰写的实用技巧,帮助研究者准确解读链式中介效应。

weixin_33690367的博客 718

.NET Petshop详解(五):petshop输出缓存设置

.NET Petshop详解(五):petshop输出缓存设置 ASP.NET的输出缓存衡量高性能、可缩放的web应用程序最重要的一个指标就是缓存了。ASP.NET提供了高性能的web应用程序的缓存功能,ASP.NET 有三种可由 Web 应用程序使用的缓存: ·  输出缓存,它缓存请求所生成的动态响应。 ·  片断缓存,它缓存请求所生成的响应的各部分。 ·  数据缓存,它

3874

我的老款Intel MacBook Pro,如何用OpenVINO把本地大模型推理速度提升10倍?

本文详细介绍了如何在老款Intel MacBook Pro上使用OpenVINO工具包将本地大模型推理速度提升10倍。通过对比Ollama CPU原生、Transformers原生和OpenVINO优化三种方案,展示了OpenVINO在性能优化上的显著优势,并提供了从环境配置到模型转换、性能调优的完整实战指南。

weixin_28694295的博客 305

OutputCache VaryByParam

ASP.NET 的输出缓存 衡量高性能、可缩放的 web 应用程序最重要的一个指标就是缓存了。 ASP.NET 提供了高性能的 web 应用程序的缓存功能 ,ASP.NET 有三种可由 Web 应用程序使用的缓存: · 输出缓存 ,它缓存请求所生成的动态响应。 · 片断缓存 ,它缓存请求所生成的响应的各部分。 · 数据缓存 ,它以编程方式缓存任意对象。为支持这种缓存, ASP.NET 提供了...

weixin_30622181的博客 181

最优化问题——一维搜索(一)

最优化问题——一维搜索 1. 一维搜索的引入 1.1 从非线性规划问题到一维搜索 在前面的文章中,我们提到了基于迭代的非线性规划问题的求解思路。在求解过程中,我们提到了在每一步的迭代中都需要对计算步长因子,其计算公式为: λk=minλf(xk+λp)λ_k=min_{λ}f(x_k+λp)λk​=minλ​f(xk​+λp) 我们将f(xk+λp)f(x_k+λp)f(xk​+λp)视为λ的一元函数,我们的目标就是求这个一元函数的极小值。对于这个问题,我通常的求解方式为一维搜索。 1.2 一维搜索的基本形

hei653779919的博客 7363

CLIP-Count代码配置以及踩坑记录

CLIP-Count代码配置以及踩坑记录

学术菜鸡 1012

MVC中配置OutputCache的VaryByParam参数无效的问题

在项目使用OutputCacheAttribute是遇到了问题,当我想在配置文件web.config中配置OutputCache的VaryByParam时竟然不起作用,下面是相关代码: 文件FaceController.cs [OutputCache(CacheProfile = "faceProfile")] public ActionResult Index() {...

weixin_30307921的博客 447

『n8n』初识界面

在首页(Overview),我们和 n8n 最常打交道的是“Workflows”、“Credentials”、“Executions”这几个面板(其实后面2个也会用到,但初学阶段可以先不管)。Workflows 面板可以看到我们创建的所有工作流,所以要给工作流起一个一眼看上去就知道是干嘛的名字。

weixin_39415598的博客 1463

MVC输出缓存(OutputCache参数详解)

1.学习之前你应该知道这些 几乎每个项目都会用到缓存,这是必然的。以前在学校时做的网站基本上的一个标准就是1.搞定增删改查2.页面做的不要太差3.能运行(ps真的有这种情况,答辩验收的时候几个人在讲台上演示,网站都运行不起来,混日子了o)就算完成任务。(老师可不会去问你这个页面怎么打开这么慢)。但是在实际工作中大大小小的项目都会用到缓存,这也是培...

weixin_34204722的博客 437

从DWS到设备树:MTK平台LK阶段GPIO初始化的隐秘路径与调试实战

本文深入探讨了MTK平台LK阶段GPIO初始化的完整流程,揭示了从DWS配置到设备树生成的隐秘转换路径。通过分析MT6768等平台的启动框架,提供了针对preloader到LK阶段GPIO初始化异常的实战调试方法与最佳实践,帮助开发者有效解决硬件与软件配置不匹配的常见问题。

h9j8k7l6m5n的博客 1004

手势控制 Python !Leap Motion Python 开发教程 (二)

手势控制 Python !Leap Motion Python 开发教程 (二) 现在进入正题,我来给大家总结一下我在使用 Leap Motion 开发过程中的经验以及学到的东西,其中我会概括以及翻译官方给出的注释,为了让这些注释更加通俗易懂,让大家更好理解。 回顾 在上一篇文章中我们讲了如何配置 Leap Motion 的 Python 2.7 的开发环境,如果您还没有配置好您的开发环境,可以参...

成畅的博客 3196

OutputCache各参数的说明

Duration 缓存时间,以秒为单位,这个除非你的Location=None,可以不添加此属性,其余时候都是必须的。 LocationLocation当被设置为None时,其余的任何设置将不起作用 Any——页面被缓存在浏览器、代理服务器端和web服务器端;     Client——缓存在浏览器;     DownStream——页面被缓存在浏览器和任何的代理服务

laolaolai的专栏 1万+

华为OD机试新系统真题-魔法咒语组合(Java/Py/C++/Go/C/Js)

华为OD机试 新系统真题【魔法咒语组合】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试真题【魔法咒语组合】多语言题解

qq_45776114的博客 673

.NET Petshop详解 petshop输出缓存设置

.NET Petshop详解  petshop输出缓存设置 ASP.NET的输出缓存衡量高性能、可缩放的web应用程序最重要的一个指标就是缓存了。ASP.NET提供了高性能的web应用程序的缓存功能,ASP.NET 有三种可由 Web 应用程序使用的缓存:· 输出缓存,它缓存请求所生成的动态响应。· 片断缓存,它缓存请求所生成的响应的各部分。· 数据缓存,它以编程方式缓存任

739

数学建模模型总结

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

VB摄像头监控

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

NET Petshop详解(五):petshop输出缓存设置

ASP.NET的输出缓存衡量高性能、可缩放的web应用程序最重要的一个指标就是缓存了。ASP.NET提供了高性能的web应用程序的缓存功能,ASP.NET 有三种可由 Web 应用程序使用的缓存:· 输出缓存,它缓存请求所生成的动态响应。· 片断缓存,它缓存请求所生成的响应的各部分。· 数据缓存,它以编程方式缓存任意对象。为支持这种缓存,ASP.NET 提供了全功能的缓存引擎,使程

笔耕专栏 960

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

.NET Petshop详解(五):petshop输出缓存设置 (转)

.NET Petshop详解(五):petshop输出缓存设置 (转)[@more@].NET Petshop详解(五):petshop输出缓存设置XML:namespace prefix = o ns = "urn:schem...

cuiji1279的博客 162

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

petshop详解之四:PetShop之ASP.NET缓存

四 PetShop之ASP.NET缓存 如果对微型计算机硬件系统有足够的了解,那么我们对于Cache这个名词一定是耳熟能详的。在CPU以及主板的芯片中,都引入了这种名为高速缓冲存储器(Cache)的技术。因为Cache的存取速度比内存快,因而引入Cache能够有效的解决CPU与内存之间的速度不匹配问题。硬件系统可以利用Cache存储CPU访问概率高的那些数据,当CPU需要访问这些数据时...

dbdx2000的博客 255
上一篇: 采用面向对象的方式去拆任务
下一篇: string 和StringBuilder比较
SysThink
博客等级 码龄17年 37粉丝 136原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值