建立一个TCP客户端,首先我们需要创建一个“对象”然后通过这个对象来帮助我们来做发送消息等一系列的操作。详细如下代码: import socket target_host = "www.baidu.com" target_port = 80 #建立一个socket对象 client = socket ...
分类:
编程语言 时间:
2020-05-08 22:55:37
阅读次数:
72
错误如下:pacman -S make gcc diffutils :: 正在获取软件包......错误:无法从 repo.msys2.org : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds 获取 ...
分类:
其他好文 时间:
2020-05-07 22:54:18
阅读次数:
232
```python import sys sys.path.append("./") import os import datetime import logging import platform from logging.handlers import RotatingFileHandler #... ...
分类:
编程语言 时间:
2020-05-07 19:35:51
阅读次数:
61
BitArray bitArray = new BitArray(16); ushort val =123; bitArray = new BitArray(BitConverter.GetBytes(val)); int shorN = 0; for (ushort i = 0; i < bitA ...
其中出现了一个错误: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes 解决办法: 在路径前加 ‘r’ 原因:在Python中 \ 是转义符,\u表示其后是UNICODE编码,因此\User在这里会报错,在字符 ...
分类:
其他好文 时间:
2020-05-06 20:08:31
阅读次数:
87
先po一个基准测试结果 package main import ( "bytes" "fmt" "strings" "testing" ) const v = "Measure the elapsed time between sending a data octet with a?" func B ...
分类:
其他好文 时间:
2020-05-06 12:15:19
阅读次数:
59
response = requests.get("http://www.baidu.com") response.content.decode("utf-8") 返回bytes类型 decode解码 response.text request.encoding = "gbk" # 修改编码 返回st ...
分类:
编程语言 时间:
2020-05-05 10:55:57
阅读次数:
82
核心控制器代码 package pubcontrollers import ( "time" "bytes" "net/http" "github.com/kataras/iris/v12" "github.com/kataras/iris/v12/mvc" "github.com/dchest/c ...
分类:
Web程序 时间:
2020-05-04 17:02:33
阅读次数:
229
In a sequence of numbers,we can find some number pairs that conform to the rule below: Assuming that there exist two numbers,N and M and it's position ...
分类:
其他好文 时间:
2020-05-02 18:46:09
阅读次数:
60
方法论: 我认为理解一个技术,最重要的是要从概念入手,理解是什么及用来做什么。理解是什么可以方便我们进行知识的归类,在这一步中定语也是很关键的点,这部分可以让我提出为什么及其他知识延伸,进一步理解和升华知识点,至于做什么很明显这个能帮忙我们解决某系列的问题。下面我按照这个步骤来剖析,错误的点欢迎指正 ...
分类:
其他好文 时间:
2020-05-02 00:29:54
阅读次数:
79