同样的代码,只改了类型,分别为stringbuilder和stringbuffer,只比较一下,执行引擎为hive。 当数据量为100000条,string builder耗时280秒,stringbuffer耗时261秒。 当数据量为1000000条,string builder耗时878秒,st ...
分类:
其他好文 时间:
2020-06-04 13:51:29
阅读次数:
59
前言: 目前项目开发中上传功能很多都是使用云存储,其好处太多这里就不列举了。但是在上传成功后,有些功能场景下需要对存储桶内的文件进行管理。自然把历史的文件列表展示出来就很有必要了。然后有列表就有分页,云存储又不像本地存储直接读文件夹就可以,所以我想了两种方法来解决。 方法: 1. 将上传的文件返回的 ...
分类:
其他好文 时间:
2020-06-04 10:27:24
阅读次数:
54
#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 ...
ffmpeg转码步骤源码实现的一点点浅析 ffmpeg转码过程对解码的处理封装在process_input()中(process_input()->decode_video()->decode()->avcodec_send_packet()),转码过程中ffmpeg会通过avformat库一包一包 ...
分类:
其他好文 时间:
2020-06-02 23:03:13
阅读次数:
67
参考文章: https://www.jianshu.com/p/29b44e3b62ed 1 cd ~ 2 mv .itmstransporter/ .old_itmstransporter/ 备份原文件.itmstransporter/到.old_itmstransporter/ 3 rm -rf ...
分类:
移动开发 时间:
2020-06-02 13:27:54
阅读次数:
186
什么是cookie?
cookie是后端服务器,传给浏览器的一段字符串,作用是用来记录用户登录的状态,和数据库中的user id结合,可
以保证知道是哪一个用户登录的。仅存储在浏览器。
# 什么是session?
session是后端服务器,传给浏览器的一段字符串,作用也是用来记录用户的登录状态(... ...
分类:
其他好文 时间:
2020-06-01 23:37:12
阅读次数:
72
FFmpeg源码结构 libavformat *AVFormatContext是API层直接接触到的结构体,它会进行格式的封装与解封装,它的数据部分由底层提供,底层使用了AVIOContext,这个AVIOContext实际上就是为普通的I/O增加了一层Buffer缓冲区,再往底层就是URLCont ...
分类:
其他好文 时间:
2020-06-01 23:30:11
阅读次数:
70
/* example1.c */ /* */ /* This small program shows how to print a rotated string with the */ /* FreeType 2 library. */ #include <stdio.h> #include <st ...
分类:
其他好文 时间:
2020-06-01 20:50:42
阅读次数:
54
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 1 ...
分类:
其他好文 时间:
2020-06-01 13:37:24
阅读次数:
62