购物车的presenter层

verilog CORDIC对数运算 阅读详情
package com.lbp.yuekao.presenter;

import com.lbp.yuekao.bean.GoosBean;
import com.lbp.yuekao.http.OnNetListener;
import com.lbp.yuekao.model.ConModelImpl;
import com.lbp.yuekao.model.IConModel;
import com.lbp.yuekao.view.IContextView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018/1/17 0017.
 */

public class MainPresenter {
    private  IConModel imainModel;
    private  IContextView iContextView;

    public MainPresenter(IContextView iContextView) {
        this.iContextView = iContextView;
        imainModel = new ConModelImpl();
    }

    public void getGoods() {
        imainModel.getGoods(new OnNetListener<GoosBean>() {
            @Override
            public void onSuccess(GoosBean goosBean) {
                //List<GoosBean.DataBean> groupList, List<List<GoosBean.DataBean.DatasBean>> childList
                List<GoosBean.DataBean> dataBean = goosBean.getData();
                List<List<GoosBean.DataBean.DatasBean>> childList = new ArrayList<List<GoosBean.DataBean.DatasBean>>();
                for (int i = 0; i < dataBean.size(); i++) {
                    List<GoosBean.DataBean.DatasBean> datas = dataBean.get(i).getDatas();
                    childList.add(datas);
                }
                iContextView.showList(dataBean, childList);
            }

            @Override
            public void onFailure(Exception e) {

            }
        });

    }
}
YOLO26涨点改进 | 全网独家,注意力创新改进篇 | Arxiv2025 | YOLO26引入MSLA多尺度线性注意力模块,高效提取多尺度特征和建模长程依赖,含多种创新改进,助力有效涨点 本文提出了一种多尺度线性注意力模块(MSLA)来优化YOLO26模型。MSLA通过并行使用不同尺寸的深度可分离卷积(3×3至9×9)提取多尺度特征,并结合线性注意力机制高效建模全局依赖关系。该模块显著提升了模型对多尺度目标的检测能力,同时保持了轻量化特性。实验表明,MSLA能有效增强小目标检测和复杂场景下的分割精度。文章详细介绍了MSLA的网络结构、核心优势及实现代码,并提供了两种集成MSLA的YOLO26改进方案,为实时目标检测任务提供了高效解决方案。 阅读详情

相关推荐

微信小程序网关逆向分析:从协议、签名到会话管理的安全架构剖析

在现代Web与移动应用开发中,API网关作为客户端与后端服务之间的关键通信枢纽,承担着协议转换、流量调度、安全防护与性能优化等核心职责。其工作原理通常涉及统一的请求路由、身份认证、参数校验与响应聚合。从技术价值看,深入理解网关机制不仅能帮助开发者构建更健壮、可扩展的微服务架构,还能为安全评估、性能调优与故障排查提供基础。在移动生态如微信小程序中,网关设计尤为关键,它需要处理微信特有的登录态、数据加密与防重放攻击等安全需求。本文聚焦于微信小程序网关的逆向分析方法,通过结合网络抓包与代码反编译技术,深入解析其通

weixin_29323493的博客 442

java视图_java – 模型视图Presenter和复合视图

我试图在java swing ui应用程序中遵循MVP(特别是Passive-View)模式.应用程序的基本设计提醒向导控件.屏幕分为两个主要部分:>积极的观点.>一个静态导航栏,带有导航按钮.用户可以使用按钮更改活动视图,但始终显示该栏.在这个场景建模中,我有一堆不同的screers,每个都有它自己的演示者,视图界面和视图实现(使用JPanel).然后我有一个Shell演示者,使用J...

weixin_33602515的博客 328

DrissionPage实战:5分钟搞定京东滑块验证码自动登录(附完整轨迹生成代码)

本文详细介绍了如何使用DrissionPage工具实现京东滑块验证码的自动化登录,包括环境配置、滑块缺口识别、拟人化轨迹生成算法及完整登录流程。通过物理运动学模型和智能识别技术,有效提升验证码破解成功率,适用于电商自动化场景。

weixin_29229055的博客 244

MVP

在MVP 架构中跟MVC类似的是同样也分为三层。Activity 和Fragment 视为View层,负责处理 UI。Presenter 为业务处理层,既能调用UI逻辑,又能请求数据,该层为纯Java类,不涉及任何Android API。Model 层中包含着具体的数据请求,数据源。三层之间调用顺序为view-&gt;presenter-&gt;model,为了调用安全着想不可反向调用!不可跨级调...

Kslient的博客 291

微机原理与接口技术第六版周荷琴课后习题答案及解析(期末重点)

第二章 1.8086/8088CPU可直接寻址多少个内存(字节)单元?多少个I/O端口?它们的外部数据总线各有多少根? 8086/8088CPU使用的是20位地址总线,因此可以直接寻址2的20次方个内存单元(即1,048,576),每个单元大小为1字节,因此可以直接寻址2的20次方个字节的内存。 8086/8088CPU有64K个I/O端口,每个端口占用1字节的地址空间,因此可以直接寻址6...

Wmicheng的博客 1万+

MAC M1用户必看:UTM虚拟机安装Win11全流程避坑指南(附驱动下载)

本文为MAC M1用户提供UTM虚拟机安装Win11的完整指南,涵盖镜像准备、驱动优化及性能调优等关键步骤。特别针对TPM 2.0验证、网络连接等常见问题提供解决方案,帮助用户高效运行Windows 11 ARM版。

weixin_29204205的博客 338

java mvp设计模式,初探 MVP(Model View Presenter) 设计模式 | 学步园

刚刚转入C#开发不久,发现了一个类似于Java里的MVC模式的东东——MVP(Model View Presenter) 模式,个人感觉MVP模式真的和MVC差不多,MVC我这里就不解释了,着重讲讲MVP,MVP 里的M 其实和MVC里的M是一个,都是封装了核心数据、逻辑和功能的计算关系的模型(这里我们不做重点介绍),而V是视图(窗体),P我认为就是封装了窗体中的所有操作、响应用户的输入输出、事件...

weixin_30784365的博客 699

基于Simulink的自适应反步法(Adaptive Backstepping)控制​

本文针对非线性系统控制中未知参数和强非线性耦合的挑战,提出基于Simulink的自适应反步法解决方案。通过融合参数在线估计与反步递归设计,该方法显著提升了永磁同步电机(PMSM)速度控制的鲁棒性,使跟踪误差从20%降至3%,参数估计收敛时间小于0.5秒。文章详细阐述了从算法推导到Simulink实现的完整流程,包括系统架构设计、核心算法推导(以PMSM为例)、模块化建模方法、参数优化策略以及工程部署建议。提供的自适应控制器MATLAB代码和关键参数表可直接应用于实际工程,为电机驱动、机械臂等非线性系统控制提

xiaoheshang_123的博客 101

如何使用 Presenter 模式?

使用 Presenter 輔助 View 若將顯示邏輯都寫在 view,會造成 view 肥大而難以維護,基於 SOLID 原則,我們應該使用 Presenter 模式輔助 view,將相關的顯示邏輯封裝在不同的 presenter,方便中大型專案的維護。 Version Laravel 5.1.22 顯示邏輯 顯示邏輯中,常見的如 : 將資料顯示不同資

markely的专栏 4056

13. MIC配置

恒玄BES2700,支持3个MIC。

雪飞_海 925

Node-RED教程(二):Node-RED的面板的操作

Node-RED系列(二):Node-RED的面板的操作 要使用Node-RED去搭建一个物联网平台,链接设备,设备通信,就必须要先熟悉Node-RED的这种面板,对于一个新的项目,在动手做之前一点想对这个的技术的文档有足够的了解做起来才能游刃有余。本期我给大家介绍一下Node-RED的各种面板,熟悉这些面板后,在后续的搭建Iot服务中,会举重若轻,同时该系列的文档,难度会逐步加深,知道了本章解释的名称后对后续文章的理解有很大帮助。 面板1:默认节点选项列表 安装Node-RED后默认的节点分为这5大类

知无涯 1万+

Presenter基类

public abstract class BasePresenter&lt;T&gt; { protected Reference&lt;T&gt; mViewRef;//View接口类型弱引用 public void attachView(T view) { mViewRef = new WeakReference&lt;T&gt;(view); //建立关联...

共享时代 513

Flatten 层的深度理解与运用

Flatten 层的深度理解与运用

你要拥有一个你喜欢并且热爱的人生 7030

展示p层

package com.example.aason.loginandreg.presenter; import com.example.aason.loginandreg.bean.CartBean; import com.example.aason.loginandreg.contract.CartContract; import com.example.aason.loginandreg.mo...

Aasons的博客 249

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

购物车P层

package com.example.aason.gouwuche1.presenter; import com.example.aason.gouwuche1.bean.CartBean; import com.example.aason.gouwuche1.contract.CartContract; import com.example.aason.gouwuche1.model.Cart...

Aasons的博客 187

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

分类页面所有presenter层跟Ipresenter层

presenter层:   AddCartPresenter: public class AddCartPresenter implements AddCartPresenterInter { private ActivityAddCartInter activityAddCartInter; private AddCartModel addCartModel;

Cf1035630950的博客 380

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

Presenter

package com.bwei.j.myapplication.cart.presenter; import com.bwei.j.myapplication.cart.bean.MyCartBean; import com.bwei.j.myapplication.cart.model.MyMolde_Cart; import com.bwei.j.myapplication.cart.vi

L_SpiderMan的博客 387

Android_添加购物车

添加到购物车的model层/** * 添加购物车的model层 * * */ public class AddShopCarModel { public void receive(String source, String uid, String pid, final IAddShopCarModel iAddShopCarModel) { OKHttpUtils ins

Android10001的博客 1113

购物车(MVP)

//Contract package com.bwei.zonghe_1.di.shoppingcar.contract; import com.bwei.zonghe_1.data.bean.BuyCarBean; /** * Created by 杨柳 on 2018/9/22. */ public interface ShoppingCartContract { //一...

Yang_Liu_1的博客 272

购物车MVP

* Description:购物车逻辑层  */ public class CartPresenter {     private CartModel cartModel;     private  IcartView icartView;     public CartPresenter(IcartView icartView) {         cartModel =new CartMo...

小明的博客 283

添加购物车

实现购物车商品的展示和添加购物车,不过添加购物车还有点小问题,也不是太大 凑合着看吧

Star_Q的博客 1110

仿京东购物车

一、购物车连接 1. public class Api { public static final String APIURL=“https://www.zhaoapi.cn/”; } 2. public interface ProductApi { @POST(“product/getCarts”) @FormUrlEncoded Observable ProductData(@FieldMap...

qq_42993958的博客 210

Android_Okhttp请求查询购物车

查询购物车的model层 public class SelectCarModel { private String url="http://120.27.23.105/product/getCarts"; private HashMap map = new HashMap<>(); public void verifySelectCarInfo(int uid, fi

Android10001的博客 376

Android_删除购物车

删除购物车的model层public class DeleteModel { public void deleteverfy(String uid, String pid, final Deleteper deleteper){ Map<String,String> map=new HashMap<>(); map.put("uid",uid);

Android10001的博客 751

Android_Retrofit+RxJava购物车的MVP

1.model层 public class MyGoodModel { public void getShop(String pid,final Goods_p goods_p){ Api api = RetrofitUtil.getInstance(Urls.base_url).create(Api.class); HashMap map = new H

Android10001的博客 454

mvp购物车

加入依赖 compile 'com.squareup.okio:okio:1.5.0' compile 'com.squareup.okhttp3:okhttp:3.2.0' compile 'com.google.code.gson:gson:2.8.2' compile 'com.github.bumptech.glide:glide:3.7.0' ____________

qq_39598738的博客 318
上一篇: 购物车的model层
下一篇: 购物车主界面和view层
忙着写BUG
博客等级 码龄9年 11粉丝 48原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值