linux内核中的进程列表
/include/linux/types.hstruct list_head { struct list_head *next, *prev; };与响应的结构组成双向链表。
/include/linux/types.hstruct list_head { struct list_head *next, *prev; };与响应的结构组成双向链表。
这篇文章 Python at Netflix 是出自 Netflix Technology Blog
题目: You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a separate doubly linked list. These child lists may have one or more children of their own, and so on, to produce a multilevel data structure, as shown in the example below. Flatten the list so that all the nodes appear in a single-level, doubly linked list. You are given the head of the first level of the list. ...
使用python多线程方式扫描某台机器开放端口 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 import socket import time import threading from queue import Queue socket.setdefaulttimeout(0.25) print_lock = threading.Lock() target = '127.0.0.1' def portscan(port): s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) try: con = s.connect_ex((target,port)) if con == 0: with print_lock: print('port', port, 'is open') con.close() except: pass def threader(): while True: worker = q.get() portscan(worker) q.task_done() q = Queue() startTime = time.time() for x in range(1000): t = threading.Thread(target=threader) t.daemon = True t.start() for worker in range(1,65536): q.put(worker) q.join() print('Time taken:', time.time()-startTime) 参考: ...
这篇文章 Introducing SVT-AV1: a scalable open-source AV1 framework 是出自 Netflix Technology Blog SVT-AV1是什么 ? SVT-AV1是2019年4月8日, Intel与Netflix合作开发的视频软件解码器,SVT Scalable Video Technology 是Intel的开源框架,Visual Cloud(视觉云)开发技术人员提供高性能的视频编码库。 视频标准历史 视频压缩标准两大组织: ITU-T and MPEG (ISO), 第一个成功的数字视频标准MPEG-2, 之后有 H.264/AVC是现代设备普遍支持的标准。 一些公司开发标准如Microsoft’s VC-1 and Google’s VPx 。 AOM(the Alliance for Open Media)意在生成一个先进的, 免税的视频解码器。 包括,Amazon, Apple, ARM, Cisco, Facebook, Google, IBM, Intel, Microsoft, Mozilla, Netflix, Nvidia, and Samsung, AOM在2018年发布了为AV1 解码器规范。 (对应的 ITU-T and MPEG组织退出了 HEVC(H.265, MEPG-H part2), 这个还是收税的) AV1编码器工具 libaom 目前是基于VP9,VP8基础上开发, 再google的git上通过AOM成员维护。 rav1e :open-source AV1 不过是用Rust语言编写的。 ...
常用的硬盘分区及空间信息查看命令
VMWARE 安装centos7 , 参考鸟哥私房菜第三章
题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1->2->4, 1->3->4 Output: 1->1->2->3->4->4 解题: 新申请哨兵节点重组新的链表返回 。 比较两个链表选择较小的接入新链表,对于较长的链表,将其剩余部分接到新链表的尾部。 实现: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 struct ListNode* mergeTwoLists(struct ListNode* l1, struct ListNode* l2){ struct ListNode* result = (struct ListNode *)malloc(sizeof(struct ListNode) ); if (result == NULL){ return NULL; } result->next = NULL; struct ListNode* l3 = result; while(l1!=NULL && l2!=NULL){ if (l1->val<l2->val){ l3->next = l1; l1= l1->next; l3= l3->next; }else{ l3->next = l2; l2= l2->next; l3= l3->next; } } if (l1!=NULL){ l3->next = l1; } else if (l2!=NULL){ l3->next = l2; } return result->next; } 递归方式:比较两个链表当前节点较小节点,这个结点的next节点与另外一个链表的当前节点比较,更新next节点。终止条件,如果一个节点为空,则返回另外一个节点。 ...
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add
DNS是一个分层级 (hierarchical ),分布式(decentralized)的网络数据库,完成主机名称和IP地址之间的相互映射。DNS名称空间包含一个树状结构,树根没有命名, 下面是树的最高层为顶级域名, 顶级域名包括: 顶级域名(gTLD),国家代码顶级域名(ccTLD), 国际化国家设施顶级域名(infrastructure TLD), 下面