20pzqm 20pzqm
3年前
【electron】ipc模块使用
electron进程模型electron使用多进程架构与chromium类似,electron使用多进程架构。单一进程架构能够节省资源,然而浏览器经常遇到恶意代码,可能导致进程崩溃,浏览器的多个页签公用一个进程必然会一损俱损,因此多进程架构更适合些()。在开发electron的过程中,我们主要接触两个进程:主进程mainprocess与渲染进程re
Stella981 Stella981
3年前
Python socket网络模块
一、基于TCP协议的socket通信以打电话为理解方式进行TCP的通信。Server端代码:importsocketphonesocket.socket(socket.AF_INET,socket.SOCK_STREAM)购买电话卡,AF_INET服务器之间网络
Stella981 Stella981
3年前
Python之CSV模块
1\.CSV简介CSV(CommaSeparatedValues)是逗号分隔符文本格式,常用于Excel和数据库的导入和导出,Python标准库的CSV模块提供了读取和写入CSV格式文件的对象。1.1csv.reader对象和csv文件的读取
Stella981 Stella981
3年前
JavaScript模块化
前言:模块化开发需求在JS早期,使用script标签引入JS,会造成以下问题:1.加载的时候阻塞网页渲染,引入JS越多,阻塞时间越长。2.容易污染全局变量。3.js文件存在依赖关系,加载必须有顺序。项目较大时,依赖会错综复杂。4.引入的JS文件过多,不美观,且不易于管理。一、CommonJS规范
Wesley13 Wesley13
3年前
Vertx eventbus模块解析
eventbus事件總線協議棧TCP分包,粘包解決採用方案:消息定长(定義消息体總长度),消息分为消息头和消息体dataTypebytesdescriptionint4包体总大小code:<<buffer.setInt(0,buffer.length()4)by
Stella981 Stella981
3年前
Play Mongo 模块简介
PlayMongo是什么?PlayMongo(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fgithub.com%2Fplaycommunity%2Fplaymongo"PlayMongo")是一个专门为PlayFramework
Wesley13 Wesley13
3年前
vertx的HttpServer模块
StartHttpServer/启动HttpServermultiinstances采用synchronized防止线程安全问题addHandlers方法是actor模式的实现(EventLoopPoolSizeinstances
Wesley13 Wesley13
3年前
IO相关模块摘抄
FileobjectsareimplementedusingC’sstdiopackageandcanbecreatedwiththebuiltinopen()functioncStringIO.StringIO(\s\) UnliketheStringIOmodule,thismoduleisn
Wesley13 Wesley13
3年前
python的stat模块
!/usr/bin/envpythonencoding:UTF8importos,time,statfileStatsos.stat('test.txt')获取文件/目录的状态fileInfo
Stella981 Stella981
3年前
Python 安装requests模块
hony@honyvirtualmachine:~$sudopipinstallrequestsIn\1\:importrequests;In\2\:rrequests.get('http://www.baidu.com')In\3\:printr.content