Skip to content

四号程序员

Keep It Simple and Stupid

  • Home
  • 读过的书
  • 从0到1实战微服务架构(第2版)

ts如何merge两个obj的数组(基于key)

Leave a reply

数据例子:
const arr1 = [
{ id: 1, name: 'John' },
{ id: 2, name: 'Alice' },
{ id: 3, name: 'Bob' }
];

const arr2 = [
{ id: 2, age: 30 },
{ id: 3, age: 25 },
{ id: 4, age: 28 }
];
代码:
const mergedArray = arr1.map((item) => {[......]

继续阅读

This entry was posted in 前端技术 and tagged ts, 合并数组 on 2023-08-30 by coder4.

puppeteer如何做性能分析

Leave a reply

毕竟也是Chrome

goto前:awaitpage.tracing.start({ path:'trace.json' });

waitxx后:awaitpage.tracing.stop();

生成的trace.json文件,用以下3种方式分析:

  • Chrome DevTools
  • timeline viewer
  • trace cafe

 [......]

继续阅读

This entry was posted in 前端技术, 计算机技术 and tagged puppeteer, tracing, 性能 on 2023-08-17 by coder4.

原版字体文件下载ttf

1 Reply

https://freefontsfamily.com/

https://fontsgeek.com/

https://www.download-free-fonts.com/[......]

继续阅读

This entry was posted in Linux and tagged 下载, 原版, 字体 on 2023-08-16 by coder4.

30秒上手firewalld防火墙配置

Leave a reply

1 安装、启用
# 启动防火墙
systemctl start firewalld

# 加入开机自自动
systemctl enable firewalld

# 停止防火墙
systemctl stop firewalld
2 基本查看
# 查看状态 / 端口
firewall-cmd --state
firewall-cmd --list-all
3 禁用 / 放行
# 添加端口(记得reload)
firewall-cmd --zone=public --[......]

继续阅读

This entry was posted in Linux and tagged docker, firewalld, 防火墙 on 2023-08-07 by coder4.

如何用pdfbox添加一个cmyk的图片

Leave a reply

如果你不知道怎么获得一个cmyk的img,可以参考 《Java如何将RGB图片转化为CMYK图片》 
PDPage page = new PDPage(REC_B5_BLEED);
page.setMediaBox(REC_B5_BLEED);

// img必须是cmyk的
PDImageXObject pdImage = LosslessFactory.createFromImage(document, img);
pdImage.setColorSpace(PDColorSpa[......]

继续阅读

This entry was posted in Java on 2023-07-13 by coder4.

Post navigation

← Older posts
Newer posts →

Categories

  • Android
  • C && C++
  • Go
  • iOS
  • Java
  • Linux
  • Mac
  • NLP
  • opencv
  • Perl
  • PHP
  • Python
  • RPC
  • Ruby
  • Visual C++ && C#
  • Windows
  • Wordpress
  • 前端技术
  • 大数据技术
  • 心情随笔
  • 搜索技术
  • 数据库技术
  • 未分类
  • 机器学习
  • 笔面题
  • 算法&数据结构
  • 网络&网络模拟
  • 计算机技术
  • 设计

Tags

  • Android
  • C
  • CentOS
  • c语言
  • Debian
  • docker
  • go
  • gtk
  • Hadoop
  • Hive
  • ios
  • Java && J2EE
  • Java && J2EE
  • Java核心技术
  • KVM
  • Linux
  • MySQL
  • nginx
  • Oracle
  • PHP
  • Python
  • Python Essential Reference
  • shell
  • socket
  • Ubuntu
  • VC
  • windows
  • 严蔚敏
  • 中文
  • 乱码
  • 卷2
  • 字符串
  • 安装
  • 实现
  • 排序
  • 教程
  • 数据结构
  • 核心技术
  • 算法
  • 算法技术手册
  • 编译
  • 读书笔记
  • 递归
  • 配置
  • 重读
Proudly powered by WordPress