在理解异步以及netty之前,我们需要先对NIO实现通信架构进行回顾,便于后续理解Netty的机制。 Java NIO 基本介绍 Java NIO(New IO)也有人称之为 java non-blocking IO是从Java 1.4版本开始引入的一个新的IO API,可以替代标准的Java IO ...
分类:
其他好文 时间:
2021-06-22 17:53:51
阅读次数:
0
1.今天继续学习fragment 布局就不放了 重要代码: MyFragment.java: public class MyFragment extends Fragment { private String content; public MyFragment(String content) { ...
分类:
其他好文 时间:
2021-06-21 21:09:34
阅读次数:
0
dedecms图集列表中调用单个图集的图片数量。 打开文件/include/common.func.php,在文件中添加函数: /*** 调用图集中图片数量* 鹏程木业网 https://www.360muye.cn/**/function Getimgnum($aid) { global $dsq ...
分类:
其他好文 时间:
2021-06-21 21:07:20
阅读次数:
0
1.正常序列化 new Gson().toJson(obj) 2.序列化null Gson gson = new GsonBuilder().serializeNulls().create(); gson.toJson(obj) 3.忽略序列化某字段 排除transient字段 字段加上transi ...
分类:
其他好文 时间:
2021-06-21 20:59:25
阅读次数:
0
今天在昨天的基础上,相继完成了三个页面的布局和显示情况: 新增加的xml文件如下: activity_add.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android ...
分类:
移动开发 时间:
2021-06-21 20:49:16
阅读次数:
0
阅读原文 1.以流的方式下载. public HttpServletResponse download(String path, HttpServletResponse response) { try { // path是指欲下载的文件的路径。 File file = new File(path); ...
分类:
编程语言 时间:
2021-06-21 20:48:13
阅读次数:
0
本文主要介绍ASP.NET Core中,在Startup.cs中ConfigureServices()方法中调用services.AddMvc()方法,出现异常(KeyNotFoundException: The given key was not present in the dictionary ...
分类:
Web程序 时间:
2021-06-21 20:44:57
阅读次数:
0
1.webpack.config.js中导入 const HtmlWebpackPlugin = require('html-webpack-plugin') 2.pulgin中新增 new HtmlWebpackPlugin({ template:'index.html' }) 3.需要删除out ...
分类:
Web程序 时间:
2021-06-21 20:44:37
阅读次数:
0
1、未使用”git add .“缓存代码的情况下 git checkout . 使用此命令可以用来放弃掉还灭有加入到缓存区的修改 但是此命令不会删除新建的文件,因为新建的文件还没有加入到git的管理系统中 2、已经使用了git add . 命令的情况下 git reset HEAD filepath ...
分类:
其他好文 时间:
2021-06-21 20:29:45
阅读次数:
0
一个大的项目,PHP会引用很多文件,有时候不知道文件在哪定义,有时候不知道在哪使用的,这就很麻烦。PHP有系列的小函数可以使用:查看方法/类在是怎么被调用的;debug_backtrace(); //返回方法/类被调用的过程<?php// filename: /tmp/a.phpfunction a ...
分类:
其他好文 时间:
2021-06-21 20:27:25
阅读次数:
0