Skip to content

年年有"余"

最好的投资是自己,最好的开始就是现在!( The best investment is investing in yourself and the best time to start is just now ! )

  • 最新文章
  • 论坛
  • 前端
    • 项目实战(iOS)
    • macOS
    • Html5
    • JavaScript
    • Android
    • 错误分析(iOS)
  • 后端
    • CentOS
    • Java
    • 数据库
    • 运维
  • 底层
    • C/C++
    • 汇编
    • 逆向工程
  • 其他
    • 投资理财
    • 汽车电子
  • 关于

使用递归将一维数组转换为树型结构

Leave a reply
const list = [{id: 100,name: 100, pid: 10}, {id: 20, name: 20, pid: 2}, {id: 1, name: 1}, {id: 2, name: 2}, {id: 10, name: 10, pid: 1}, {id: 11, name: 11, pid: 1}]

const arrayToTree = (array, pid) => {
    return array.reduce((res, current) => {
        if (current.pid === pid) {[......]

继续阅读

This entry was posted in JavaScript and tagged Array, javascript, tree, 数据结构 on 2024年3月1日 by Sian.

如何在HTML中使用SVG制作一个税务章

Leave a reply

How to generate a stamp using SVG in HTML[……]

继续阅读

This entry was posted in Html5 and tagged Html, svg, 发票, 数电票 on 2024年2月1日 by Sian.

如何搭建自己的远程下载工具

Leave a reply

How to start a remote download server for torrent. Deluge[……]

继续阅读

This entry was posted in 其他, 默认分类 and tagged download, p2p, torrent, 下载, 远程下载 on 2024年1月12日 by Sian.

如何在Docker中创建OpenWrt容器

Leave a reply

How to create an openwrt container on Docker.[……]

继续阅读

This entry was posted in Debian/Ubuntu, 默认分类 and tagged docker, Linux, OpenWRT on 2023年11月23日 by Sian.

如何批量修改照片日期/时间

Leave a reply

EXIF is stand for Exchangeable Image File Format.[……]

继续阅读

This entry was posted in 默认分类 and tagged exif, exiftool, icloud, image on 2023年9月11日 by Sian.

Post navigation

← Older posts
Newer posts →
May 2026
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031
« Mar    

Archives

近期文章

  • Debian禁用ipv6的简单方式 2026年3月30日
  • 日本の文化についておすすめの映画 2025年10月18日
  • How to write an image to a usb flash disk in debian 2025年4月13日
  • 新测能用的Docker镜像 2025年3月28日
  • 用 CNN(卷积神经网络)识别手写数字(0-9) 2025年3月6日
Proudly powered by WordPress