1、只读文件 #以文本打开文件'r' f = open('C:\\Users\\Administrator\\Desktop\\Python\\f.txt',mode='r',encoding='utf-8') content = f.read() print(content) f.close()# ...
分类:
编程语言 时间:
2020-05-10 18:48:44
阅读次数:
80
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" ...
分类:
其他好文 时间:
2020-05-10 17:03:12
阅读次数:
54
知识点: 1、在垂直布局中,我们可以指定 layout_weight的大小,来平均分配view占据的屏幕大小,这时候要把height设置为0dp(水平的设置宽度为0) 2、gravity控制子视图的显示位置 <EditText android:layout_width="match_parent" ...
分类:
其他好文 时间:
2020-05-10 16:40:52
阅读次数:
71
1.osi五层协议 # 应用层 # 传输层 # tcp协议 : 效率低 面向连接\可靠\全双工的通信 # 三次握手 # 客户端向服务器端发送syn请求, # 服务端向客户端回复ack并发送syn请求, # 客户端接收到请求之后再回复ack表示建立连接 # 由客户端的connect + 服务端的acc ...
分类:
编程语言 时间:
2020-05-10 10:23:04
阅读次数:
62
Headers Connection Management State Tansition Diagram Sequence Diagram Normal Simultaneous Open Simultaneous Close Half Close Normal with State Exampl ...
分类:
其他好文 时间:
2020-05-09 18:55:49
阅读次数:
61
管道可以看作受驱动器pipeDrv管理的虚拟I/O设备,使用基本的I/O系统接口可以读、写和操作管道,这些函数包括read、write、open、close、ioctl和select等。与pipe密切相关的其它API还有:(1)pipeDrv():初始化pipeDrv,函数原型:STATUSpipeDrv(void);(2)pipeDevCreate():创建pipe,函数原型:STATUSpip
分类:
其他好文 时间:
2020-05-09 10:41:37
阅读次数:
90
前言 Notification API 是 HTML5 新增的桌面通知 API,用于向用户显示通知信息。该通知是脱离浏览器的,即使用户没有停留在当前标签页,甚至最小化了浏览器,该通知信息也一样会置顶显示出来。 用户权限 想要向用户显示通知消息,需要获取用户权限,而相同的域名只需要获取一次权限。只有用 ...
Sobel边缘检测(2)-matlab clcclearclear all close all%%%对图像做均值滤波处理img = imread('1.png');figure(1)subplot(1,2,1),imshow(img),title('原始图像')%%%将彩色图像转灰度图像img_gr ...
分类:
其他好文 时间:
2020-05-08 18:16:07
阅读次数:
83
当需要关闭资源时,通常会使用try finally语句 java7新增了tryWithResource语句专门用于处理资源关闭的情况,基本结构为:try(){} 括号内用于初始化资源,资源需要实现java.lang.AutoCloseable接口,即实现close()方法。 括号内可以初始化多个资源 ...
分类:
编程语言 时间:
2020-05-08 10:12:24
阅读次数:
80
uniapp-使用高德地图组件 1.下载map.js文件https://lbs.amap.com/api/wx/download2. 官网map文档https://uniapp.dcloud.io/api/location/map?id=createmapcontext <template> <vi ...
分类:
移动开发 时间:
2020-05-07 19:23:37
阅读次数:
1902