一种类似Flask开发的WebSocket-Server服务端框架,适用python3.X 1、安装模块Pywss 2、搭建简易服务器 代码简介 route: 注册请求路径 example_1(request, data): request: socket句柄,能够发送和接收数据接。发送数据requ ...
分类:
编程语言 时间:
2019-10-17 23:13:24
阅读次数:
922
Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7 ...
分类:
其他好文 时间:
2019-10-17 17:53:08
阅读次数:
86
\chapter{数论} \begin{example}(1995年初联)试证:每个大于$6$的自然数$n$, 都可以表示为两个大于$1$且互质的自然数之和.\end{example}\begin{solution}\begin{enumerate} \item 当$n$是奇数,则$n=2+(n-2 ...
分类:
其他好文 时间:
2019-10-17 17:27:24
阅读次数:
109
# bytes object b = b"example" # str object s = "example" # str to bytes bytes(s, encoding = "utf8") # bytes to str str(b, encoding = "utf-8") # an alt... ...
分类:
编程语言 时间:
2019-10-17 13:46:39
阅读次数:
73
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: You may assume that the array doe ...
分类:
其他好文 时间:
2019-10-17 12:01:59
阅读次数:
83
Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. Follow up: Could you ...
分类:
其他好文 时间:
2019-10-16 23:20:06
阅读次数:
94
几个不同的关键XPath概念...... 绝对vs相对XPath(/vs .) / 引入绝对位置路径,从文档的根开始。 . 从上下文节点开始引入相对位置路径。 / 引入绝对位置路径,从文档的根开始。 . 从上下文节点开始引入相对位置路径。 命名元素vs任何元素(enamevs *) /ename选择 ...
分类:
其他好文 时间:
2019-10-16 18:07:20
阅读次数:
96
断言是什么 Python assert(断言)用于判断一个表达式,在表达式条件为 false 的时候触发异常。 运用断言 example1(商店打折): 断言语法 等价于: 由此可知,[表达式] 实际是if的判断语句 使用场景 断言不可不用,但也不能乱用 常见错误的用法是把断言当做一个检测错误的的触 ...
分类:
编程语言 时间:
2019-10-16 17:44:40
阅读次数:
82
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. N ...
分类:
其他好文 时间:
2019-10-16 11:19:18
阅读次数:
79
Javascript Numbers 知识描述:JavaScript 只有一种数字类型,即数字(Number)。数字可以带小数点,也可以不带,也就是整数和小数。 数字可以带小数点,也可以不带: Example 极大或极小的数字可以通过科学(指数)计数法来书写: Example JavaScript ...
分类:
编程语言 时间:
2019-10-16 00:37:33
阅读次数:
100