上一页 1 2 3 4 5 6 ··· 49 下一页
摘要: 为什么要使用多进程 多进程与多线程介绍 Nodejs多进程和多线程 使用与区别 cluster 为什么需要多进程 nodejs单线程,在处理http请求的时候一个错误都会导致进程退出,这是灾难级的 进程和线程介绍 进程是资源分配的最小单位,线程是cpu调度的最小单元 进程有独立的地址空间,线程是进程 阅读全文
posted @ 2022-08-17 15:38 IslandZzzz 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 事件循环允许Nodejs执行非阻塞I/O操作,尽管JavaScript是单线程的,但是可以将尽可能多的操作让系统内核去执行。 现代系统大多数内核都是多线程的,因此它们可以处理在后台执行的多个操作。 当一个操作完成时,系统就可以告诉nodejs, 以便可以将对应的回调添加到任务队列最终执行 Nodej 阅读全文
posted @ 2022-08-07 16:00 IslandZzzz 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 关于nodeType 只读属性 Node.nodeType 表示的是该节点的类型。 nodeType枚举 场景 深复制时,判断对象类型的nodeType是1, 则表明该对象是dom类型 if ((typeof sourceObj[key] 'object') && sourceObj[key].no 阅读全文
posted @ 2022-07-28 08:32 IslandZzzz 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 描述 You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, 阅读全文
posted @ 2022-07-22 16:44 IslandZzzz 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 描述 Write a function that reverses a string. The input string is given as an array of characters s. You must do this by modifying the input array in-pl 阅读全文
posted @ 2022-07-22 15:31 IslandZzzz 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 描述 A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads t 阅读全文
posted @ 2022-07-22 15:23 IslandZzzz 阅读(15) 评论(0) 推荐(0) 编辑
摘要: ' 1-a, 2-c,. 3-v#$% '.replace(/[^A-Za-z0-9]/g,'') // '1a2c3v' 阅读全文
posted @ 2022-07-22 15:16 IslandZzzz 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 描述 Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted or 阅读全文
posted @ 2022-07-22 10:53 IslandZzzz 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 描述 You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in 阅读全文
posted @ 2022-07-19 23:59 IslandZzzz 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 描述 Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors 阅读全文
posted @ 2022-07-19 22:35 IslandZzzz 阅读(17) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 49 下一页
点击右上角即可分享
微信分享提示