进程与线程的区别进程是 CPU 资源分配的最小单位 进程可以包含多个线程;线程是 CPU 调度的最小单位;一个进程由多个线程组成;线程是一个进程中代码不同的执行路线;进程之间相互独立 但是同一进程下的线程可以共享进程内的资源 JS 数据类型JS 数据类型有 7 种 Number Boolean St ...
分类:
Web程序 时间:
2020-07-13 16:49:50
阅读次数:
121
1. 首先 2.自己写一个函数:也就是我们常说的DIY 不是所有的功能前辈们都帮我们写好的,当我们遇到一些没有直接可用的函数时,我们就需要自己设计函数了,以便实现想要的功能 首先看看定义函数的语法: 以y = 3x + 5 为例子,来定义一个一次函数 一行一行来看: 第1行:def的意思是定义(de ...
分类:
其他好文 时间:
2020-07-13 14:08:41
阅读次数:
77
(贪心、字符串) ##题目大意 给一些字符串,求它们拼接起来构成最小数字的方式 ##思路 贪心算法。用cmp排序,直接判断a+b和b+a的大小即可。 必须保证两个字符串构成的数字是最小的才行,所以cmp函数写成return a + b < b + a;的形式,保证它排列按照能够组成的最小数字的形式排 ...
分类:
其他好文 时间:
2020-07-13 14:04:47
阅读次数:
60
很多网站为了实现推送技术,所用的技术都是 Ajax 轮询。轮询是在特定的的时间间隔(如每1秒),由浏览器对服务器发出HTTP请求,然后由服务器返回最新的数据给客户端的浏览器。这种传统的模式带来很明显的缺点,即浏览器需要不断的向服务器发出请求,然而HTTP请求可能包含较长的头部,其中真正有效的数据可能 ...
分类:
Web程序 时间:
2020-07-13 13:26:51
阅读次数:
59
水平有限,本文仅以流水账的方式 介绍自己 安装 三款软件 的过程。 环境Ubuntu on 虚拟机: $ cat /proc/version Linux version 4.15.0-54-generic (buildd@lgw01-amd64-014) (gcc version 7.4.0 \(U ...
分类:
其他好文 时间:
2020-07-13 13:14:44
阅读次数:
63
[root@kunpeng82 Ryu-SDN-IP]# pip3 show networkx Name: networkx Version: 2.4 Summary: Python package for creating and manipulating graphs and networks ...
分类:
Web程序 时间:
2020-07-13 11:57:49
阅读次数:
92
Given an array of integers nums. A pair (i,j) is called good if nums[i] == nums[j] and i < j. Return the number of good pairs. Example 1: Input: nums ...
分类:
其他好文 时间:
2020-07-13 09:59:42
阅读次数:
75
Given an array of integers nums. A pair (i,j) is called good if nums[i] == nums[j] and i < j. Return the number of good pairs. Example 1: Input: nums ...
分类:
其他好文 时间:
2020-07-13 09:57:03
阅读次数:
63
Given a binary string s (a string consisting only of '0' and '1's). Return the number of substrings with all characters 1's. Since the answer may be t ...
分类:
其他好文 时间:
2020-07-13 09:56:37
阅读次数:
68
Given a binary string s (a string consisting only of '0' and '1's). Return the number of substrings with all characters 1's. Since the answer may be t ...
分类:
其他好文 时间:
2020-07-13 09:45:45
阅读次数:
61