实现原理 当使用多进程的时候。多个socketio服务器通过消息队列来沟通之间的客户端sid。若发现该sid在自己的连接中。就由该进程处理发送给其下面连接的客户端 详细的可以看这里 socket.io要实现多进程以及广播,房间等功能,势必需要接入一个redis之类的消息队列,进而socket.io的 ...
分类:
编程语言 时间:
2020-12-10 11:31:08
阅读次数:
14
LC 搜索插入位置 给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。 你可以假设数组中无重复元素。 示例 1: 输入: [1,3,5,6], 5 输出: 2 示例 2: 输入: [1,3,5,6], 2 输出: 1 示例 3: ...
分类:
其他好文 时间:
2020-12-10 11:28:44
阅读次数:
5
python环境依赖 pip install PyExecJS pip install lxml pip install beautifulsoup4 pip install requests nodejs环境依赖 全局安装命令 npm install jsdom -g 或者 yarn add js ...
分类:
编程语言 时间:
2020-12-10 11:27:03
阅读次数:
7
where 条件查询、like模糊查询、order by排序、数据处理函数(单行处理函数)、分组函数(多行处理函数 )、group by 分组、 having ...
分类:
数据库 时间:
2020-12-10 11:21:08
阅读次数:
9
import os import sys def rename(): path=input("请输入路径:") count=1 filelist=os.listdir(path) for files in filelist: ori_dir=os.path.join(path,files) if o ...
分类:
编程语言 时间:
2020-12-10 11:19:57
阅读次数:
5
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and ...
分类:
编程语言 时间:
2020-12-10 11:13:48
阅读次数:
6
代码: 1 # -*- coding:utf-8 -*- 2 import re 3 # import Util.NEO4J.neo4j_util as Neo 4 import sys 5 import os 6 import time 7 sentence="" 8 num_zhang=[] 9 ...
分类:
编程语言 时间:
2020-12-10 11:00:26
阅读次数:
3
1.findall 2.search 3.match 同search,只是从头匹配 4.split 同str.split import re a = ' a bc ' print(a.split(' ')) print(re.split(' ', a)) import re print(re.spl ...
分类:
编程语言 时间:
2020-12-10 10:58:44
阅读次数:
4
1. 安装pip sudo apt install python-pip 2. 检查pip 版本 pip --version 发现pip版本是18.x的,过于旧,所以继续更新pip 3. 下载pip源码 https://pypi.org/project/pip/#files 4. 解压后进入目录,并 ...
分类:
编程语言 时间:
2020-12-10 10:53:57
阅读次数:
4
Set对每个bai对象只接受一次,并使用自己内部的排序方法(通常,你只关心某个元素是否属于Set,而不关心它的顺序--否则应该使用List)。Map同样对每个元素保存一份,但这是基于"键"的,Map也有内置的排序,因而不关心元素添加的顺序。如果添加元素的顺序对你很重要,应该使用 LinkedHash ...
分类:
其他好文 时间:
2020-12-10 10:53:41
阅读次数:
2