28、开发Web应用:货币转换器的管理对话与CSS集成

开发Web应用:货币转换器的管理对话与CSS集成

1. 引入管理对话

在开发Web应用时,管理对话是一个重要的功能。以货币转换器为例,我们可以通过点击链接调用 CcAdministration 组件,就像调用子程序一样。
- 调用 CcAdministration 组件 :
- 首先,在 CcConverter 类中定义一个额外的实例变量 ccAdministration ,并在 initialize 方法中进行初始化:

CcConverter>>initialize
    super initialize.
    self converter: Converter converterExample.
    self
        currency1: 'Euros';
        currency2: 'Euros';
        amount1: 0.0s3;
        amount2: 0.0s3.
    self ccAdministration:
        (CcAdministration new
            converter: self converter)
- 然后,在`renderAdministrativeComponentOn:`方法中添加一个链接,点击该链接将调用`CcAdministration`

相关推荐

29、Smalltalk Web应用开发与进阶指南

本文深入探讨了使用Smalltalk和Seaside进行Web应用开发的高级主题,包括静态资源整合、通用转换器的实现、设计类架构的重要性、设计模式的应用、图形用户界面编程、独立Smalltalk应用的交付以及团队开发的最佳实践。通过理论与实例结合,读者可以掌握从基础开发到高级部署的完整流程,并提升面向对象应用的设计与开发能力。

Python的专栏 61

Web应用开发:Seaside组件交互与CSS集成

本文深入探讨了Seaside框架下Web应用组件间的交互机制,以及如何通过CSS改善Web页面的视觉效果。文章首先描述了用户与货币转换器Web应用的交互过程,包括HTTP请求的处理和组件间的消息传递。随后,介绍了如何通过Seaside的回调机制实现管理员对话框,添加和修改货币汇率的功能。最后,文章解释了如何在Seaside应用中引入CSS,包括链接外部CSS文件、内嵌CSS样式和内联CSS样式的应用。

weixin_34718952的博客 900

ALC 3.0移动Web专家挑战:开发离线货币转换器

本文还有配套的精品资源,点击获取 简介:本项目是“ALC-Challenge-Curverter: ALC 3.0移动Web专家挑战”,目标是开发一个具备离线功能的货币转换器,以提升JavaScript开发者在构建移动Web应用时的技能。项目中需应用关键知识点如离线存储技术、实时货币汇率API集成、JavaScript、前端框架、响应式设计、UI设计、错误处理、数据序列化与...

weixin_34885746的博客 864

构建交互式货币转换器网站项目

在当今的数字化时代,构建一个货币转换器网站是一项常见的前端开发任务。这类网站为用户提供实时货币汇率查询、货币值之间的转换等功能,不仅方便用户的日常生活,也体现了前端技术在处理实际问题中的应用价值。一个成功的货币转换器网站必须具备易用性、兼容性和高性能等特点,这需要在构建过程中综合运用HTML、CSS和JavaScript等前端技术。本章将对货币转换器网站的整体构建流程进行概述,为后续章节深入讨论各个技术点奠定基础。

weixin_42627459的博客 1065

Web应用开发中CSS的整合与样式自定义

本文介绍了如何在Seaside框架中整合CSS以优化Web应用程序的外观。内容涵盖了定义样式方法、将CSS文件存储在Seaside文件库中,并通过updateRoot:方法使CSS文件对Web服务器可用。此外,还讨论了使用FileLibrary整合静态资源到Seaside应用程序中,以及如何通过软件组件重用减少代码复制,提高开发效率。

weixin_34718952的博客 336

Seaside框架开发Web应用详解

本文深入探讨了如何使用Seaside框架开发Web应用程序。通过货币转换器案例,详细介绍了从安装Seaside组件到实现Web界面的全过程,包括组件的初始化、HTML代码的生成以及页面渲染的机制。同时,还展示了如何利用Seaside提供的开发者工具进行调试和页面设计。

weixin_34718952的博客 361

保姆级教程:用GROMACS的FEP方法计算小分子结合自由能(附完整mdp配置)

本文提供了一份详细的GROMACS自由能微扰(FEP)计算教程,涵盖从系统准备、参数配置到结果分析的全流程。通过具体案例演示如何计算小分子结合自由能,包括λ窗口设计、动力学参数优化及并行化执行技巧,帮助研究者克服FEP计算中的常见问题,获得可靠的自由能数据。

weixin_30598225的博客 357

FPGA调试利器:VIO与ILA在Vivado中的实战应用指南

本文详细介绍了Vivado中FPGA调试工具VIO与ILA的实战应用技巧。VIO作为虚拟输入/输出工具,可实时调整参数;ILA作为集成逻辑分析仪,能高效捕获内部信号。文章通过具体案例展示了如何配置ILA采样深度、触发条件,以及VIO的动态参数调整功能,帮助开发者提升上板调试效率,解决常见通信失败、数据不同步等问题。

weixin_42553471的博客 432

告别裸机:在FreeRTOS上为STM32移植SOEM EtherCAT主站的思路与实战

本文详细介绍了在FreeRTOS环境下为STM32移植SOEM EtherCAT主站的工程实践。通过重构任务调度模型、优化内存管理和中断响应,成功将通信周期抖动控制在±100ns以内,满足工业控制系统的严苛实时性要求。文章包含完整的移植策略、性能优化方法和实测数据,为开发者提供了一套可靠的EtherCAT主站解决方案。

weixin_30342363的博客 391

2026深度破解:OpenClaw开源AI框架架构与实战全景解析

2026年初,一款名为OpenClaw的开源AI Agent框架以惊人的速度席卷全球开发者社区,短短数周GitHub星标突破20万,成为史上增长最快的开源项目。本文从架构设计、核心原理、代码实现和工程实战四个维度,深度剖析OpenClaw的技术内核,帮助开发者从理解到实践,快速掌握这一革命性的AI开发框架。

fox0329的博客 2377

基于Simulink进行步进电机的重复控制仿真建模

重复控制概述目的:通过引入一个周期延迟环节来补偿系统的周期性误差,从而提高系统对周期性参考信号或扰动的跟踪性能。方法内部模型原理:在控制器中嵌入一个与周期性信号相关的模型(例如周期延迟环节),以实现对周期性误差的零稳态误差控制。滤波器设计:为了避免高频噪声放大,通常会在重复控制器中加入低通滤波器。优势对周期性信号具有良好的跟踪性能。不需要精确的数学模型即可实现高性能控制。挑战:需要合理设计重复控制器的参数以避免系统不稳定。

amy_mhd的博客 272

Fiori Elements 表格之 Tree Tables:从数据建模到交互行为的全链路剖析

SAP Fiori elements的Tree Table组件将分层数据以表格形式展示,支持展开/折叠操作,适用于组织结构、物料清单等多级数据场景。该组件在List Report和Object Page中均可使用,支持懒加载、多选、列冻结等标准表格功能,并与OData V4服务层级注解深度集成。后端需通过RAP或CAP建模提供层级数据,前端通过清单配置切换表类型。需注意在草稿模式下仅显示活动实体,且展开状态在编辑时不保留。性能方面建议采用懒加载策略,避免全量加载树节点。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 165

家里摄像头录像存 NAS,空间爆满了怎么办?一招实现设定容量自动清理实现循环存储!

📷 家用摄像头录像久了会撑爆 NAS 吗?别担心,这篇文章教如何实现自动清理录像,释放 NAS 空间,避免爆盘🧹

XiaoqiangClub的博客 1891

DTI-ALPS 指标计算(附代码),评估脑类淋巴系统功能

DTI-ALPS 指标计算(附代码),评估脑类淋巴系统功能

xxx 1059

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

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

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

上一篇: 4、自组织机器人群体的系统识别
下一篇: 28、哲学家就餐问题算法解析
Python
博客等级 码龄26年 1973粉丝 1567原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址