08 2020 档案
摘要:创建套接字的函数是socket(),函数原型为: #include <sys/types.h> #include <sys/socket.h> int socket(int domain, int type, int protocol); 其中 “int domain”参数表示套接字要使用的协议簇,
阅读全文
摘要:git stash 用法总结和注意点 (1)git stash save "save message" : 执行存储时,添加备注,方便查找,只有git stash 也要可以的,但查找时不方便识别。 (2)git stash list :查看stash了哪些存储 (3)git stash show :
阅读全文
摘要:例如,给定一个 3叉树 : 返回其前序遍历: [1,3,5,6,2,4]。 """ # Definition for a Node. class Node(object): def __init__(self, val=None, children=None): self.val = val sel
阅读全文
摘要:输入两个递增排序的链表,合并这两个链表并使新链表中的节点仍然是递增排序的。 示例1: 输入:1->2->4, 1->3->4输出:1->1->2->3->4->4限制: 0 <= 链表长度 <= 1000 # Definition for singly-linked list.# class Lis
阅读全文
摘要:select *from cinemawhere mod(id, 2) = 1 and description != 'boring'order by rating DESC mod可以取基数,或偶数
阅读全文
摘要:例如,给定二叉树 1 / \ 2 5 / \ \ 3 4 6将其展开为: 1 \ 2 \ 3 \ 4 \ 5 \ 6python:(官方解法:前序遍历) # Definition for a binary tree node. # class TreeNode(object): # def __in
阅读全文