NTP服务介绍 网络传输中,数据包和日志都需要准确的时间戳。在Linux系统中 Network Time Protocol,NTP协议有用户在空间中的守护进程实现,即ntp和chrony。(要能访问互联网) 同步系统时间 修改配置文件制定ntp服务器同步 # 查看是否安装 [root@rhel8 t ...
分类:
其他好文 时间:
2020-06-05 21:13:27
阅读次数:
157
原文:https://www.jianshu.com/p/e53083132a25 Buffer 介绍 Buffer 是 bytes 包中的一个 type Buffer struct{…} A buffer is a variable-sized buffer of bytes with Read ...
分类:
其他好文 时间:
2020-06-05 19:19:06
阅读次数:
71
我们日常开发中,经常会遇到图片太大然后加载慢的问题,话不多说,直接上图片压缩代码 入参: MultipartFile file String fileOrigName = file.getOriginalFilename(); String fileName = String.format("%s. ...
分类:
编程语言 时间:
2020-06-05 18:00:51
阅读次数:
60
第一点:Java代码实现文件上传 FormFile file = manform.getFile(); String newfileName = null; String newpathname = null; String fileAddre = "/numUp"; try { InputStre ...
分类:
编程语言 时间:
2020-06-05 15:23:22
阅读次数:
49
所以在系统与设备通信之前,系统首先要建立一个设备文件,这个设备文件存放在/dev目录下。其实系统默认情况下就已经生成了很多设备文件,但有时候我们需要自己手动新建一些设备文件,这个时候就会用到像mkdir, mknod这样的命令。mknod 的标准形式为: mknod DEVNAME {b | c} ...
分类:
系统相关 时间:
2020-06-04 13:59:44
阅读次数:
66
同样的代码,只改了类型,分别为stringbuilder和stringbuffer,只比较一下,执行引擎为hive。 当数据量为100000条,string builder耗时280秒,stringbuffer耗时261秒。 当数据量为1000000条,string builder耗时878秒,st ...
分类:
其他好文 时间:
2020-06-04 13:51:29
阅读次数:
59
HTTPS 协议 推荐Blog: 了解 HTTPS 图解 HTTPS HTTPS 协议是什么? HTTPS (Hyper Text Transfer Protocol over SecureSocket Layer)是基于 HTTP 衍生出的可进行加密传输、身份认证的网络协议 。是以安全为目标的 H ...
分类:
Web程序 时间:
2020-06-03 23:22:00
阅读次数:
104
#include <iostream> using namespace std; /* * 内存管理器,分配大块内存供使用,最后集中回收 */ class AllocMem { private: enum {BlockSize = 2048};//buffer尺寸大小 struct Block { ...
分类:
其他好文 时间:
2020-06-03 20:32:49
阅读次数:
71
使用StretchDIBits将位图数据传输到printer的dc中 #include <Windows.h> #include <algorithm> int main() { int nWidth = 16, nHeight = 16; BYTE byteBitmap[768]; std::fi ...
前言 core跨域严格来说是要分为两步的,因为分为简单跨域和复杂跨域,第一种为直接允许跨域,第二种因为存在某些框架本身不允许put,delete这两个,那么这就是一个问题了。对的,那么mvc这种重量级框架,肯定是帮我们封装好了。 正文 我们可以在配置文件中配置允许put和delete,然后设定运行的 ...