import socket client = socket.socket() client.connect(('127.0.0.1',8001)) while 1: msg = input('客户端说>>>') client.send(msg.encode('utf-8')) from_server... ...
分类:
其他好文 时间:
2019-01-07 22:36:30
阅读次数:
211
编码编码的转换 s = 'alex' s1 = s.encode('utf-8') # 编码 utf-8 包含了ascii print(s1.decode('gbk')) # 解码 gbk 包含了ascii ...
分类:
其他好文 时间:
2019-01-06 18:26:58
阅读次数:
118
首先说一下远程调试的配置,首先在weblogic的启动文件加入如下配置,开启服务器远程调试端口就是9999: 第二步,建立一个java的空项目。 第三步将weblogic的所有jar包拷出来,放到一个文件中。 第四步把jar包导入idea的lib配置中 第五步添加一个remote,端口修改为9999 ...
分类:
Web程序 时间:
2019-01-04 21:31:21
阅读次数:
323
同步异步 对于一次IO访问(以read举例),数据会先被拷贝到操作系统内核的缓冲区中,然后才会从操作系统内核的缓冲区拷贝到应用程序的地址空间。所以说,当一个read操作发生时,它会经历两个阶段: 1. 等待数据准备 (Waiting for the data to be ready) 2. 将数据从 ...
分类:
其他好文 时间:
2019-01-04 20:20:42
阅读次数:
189
mysqlbinlog --no-defaults --base64-output=decode-rows -v -v mysql-bin.000002 |awk '/###/{if($0~/UPDATE|INSERT|DELETE/)count[$2" "$NF]++}END{for(i in c ...
分类:
数据库 时间:
2019-01-04 16:15:02
阅读次数:
212
package main import ( "encoding/json" "fmt" "os" ) type PersonInfo struct { Name string age int32 Sex bool Hobbies []string } func main() { writeFile(... ...
分类:
Web程序 时间:
2019-01-04 10:37:47
阅读次数:
279
A registration card number of PAT consists of 4 parts: the 1st letter represents the test level, namely, T for the top level, A for advance and B for ...
分类:
其他好文 时间:
2019-01-02 22:14:53
阅读次数:
195
一.服务端:(互相传) 客户端: 二.服务端(传给服务端) 客户端: ...
分类:
其他好文 时间:
2019-01-02 19:25:49
阅读次数:
135
服务器端# #导入socket模块 import socket# #创建socket对象,创建了一个手机# server = socket.socket()## #给程序设置一个ip地址和端口号,买了个手机卡# ip_port = ('192.168.12.11',8002)## #绑定ip地址和端 ...
分类:
其他好文 时间:
2019-01-02 19:24:25
阅读次数:
184