摘要: 业务场景需要在一个方法上面根据参数不同进行不同的业务逻辑实现,返回结果是统一封装的结果。 该业务场景的类似之处,参考netty 在通过handler 实现不同的逻辑处理。 如果超市货架上面的商品,消费者根据自己的需求,拿去想要的商品后,在收银台统一结算。 从数据结构上面的想到的是:使用链表的方式达到 阅读全文
posted @ 2021-09-17 20:58 serviceOBJ 阅读(48) 评论(0) 推荐(0)
摘要: 一个100大小的int数组,要求随机添加1-100的数到其中,且不能有重复。 思考:在for(0-99)循环中 肯定要产生随机数然后与数组中元素比较,如果产生的随机数在for(0-i)中有相等,则 跳出循环,再产生随机数;如果不等,继续在for(0-i)中比较,直到小循环中是i值还是不等,说明不存在 阅读全文
posted @ 2021-03-10 20:20 serviceOBJ 阅读(36) 评论(0) 推荐(0)
摘要: String str = "2.jpg"; File f = new File(str); try { BufferedImage image2 = ImageIO.read(f); int w = image2.getWidth(); int h = image2.getHeight(); int 阅读全文
posted @ 2021-02-18 20:49 serviceOBJ 阅读(1053) 评论(0) 推荐(0)
摘要: <template> <div id="test"> <el-form :model="form" :rules="rule" ref="form" label-width="100px" id="form"> <el-form-item label="账户" prop="name" > <el-i 阅读全文
posted @ 2021-01-27 18:21 serviceOBJ 阅读(1087) 评论(1) 推荐(0)
摘要: <template> <div id="a" style="background-color: gray" > <form action="index.html" method="post"> <P>账号:<input v-model="user.id" ></P> <P>密码:<input v-m 阅读全文
posted @ 2021-01-06 20:33 serviceOBJ 阅读(464) 评论(0) 推荐(0)
摘要: 项目可以在https://gitee.com/rightway/reaserch 下载下来查看。 webpack 使用说明参考官网文档:https://www.webpackjs.com/concepts/ 该网址作为配置 webpack.config.js 文档提供官方说明。 由于要使用vue 来 阅读全文
posted @ 2021-01-05 13:08 serviceOBJ 阅读(88) 评论(0) 推荐(0)
摘要: node.js 有国内镜像, 下载后直接安装即可。 node环境变量的配置: npm config set prefix "path" //path 为全局modules下载时的绝对路径。 npm config set cache "path_cache" //path_cache 缓存的绝对路径。 阅读全文
posted @ 2020-12-29 17:14 serviceOBJ 阅读(158) 评论(0) 推荐(0)
摘要: StringBuffer buffer1 = new Tt() { StringBuffer buffer = new StringBuffer().append(ins); }.buffer; Itest itest = new Tt() { Itest i = new Itest() { @Ov 阅读全文
posted @ 2020-09-15 12:18 serviceOBJ 阅读(106) 评论(0) 推荐(0)
摘要: netty 中至关重要的NioEventLoop NioEventLoop extends SingleThreadEventLoop 从继承结构上面可以明显的看到是一个单线程的实现。但它实际是implements java.util.concurrent.Executor 下文写关于它的execu 阅读全文
posted @ 2020-09-11 19:44 serviceOBJ 阅读(286) 评论(0) 推荐(0)
摘要: 本文说明下ServerBootstrapAcceptor ServerBootstrapAcceptor extends ChannelInboundHandlerAdapter 它作为ServerBootStrap 的内部类。 它本身就是个Channelhandler,因为是继承ChannelIn 阅读全文
posted @ 2020-09-11 18:47 serviceOBJ 阅读(324) 评论(0) 推荐(0)