上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 一. virtualenv虚拟环境 1. virtualenv的安装 pip3 install virtualenv 2. 通过命令创建虚拟环境 创建一个干净的隔离环境, 以python3为复制本体, 虚拟环境名为virtualname virtualenv --no-site-packages - 阅读全文
posted @ 2019-06-27 21:55 雾霾1024 阅读(5809) 评论(0) 推荐(0) 编辑
摘要: 一. Flask的启动 from flask import Flask app = Flask(__name__) app.run() from flask import Flask app = Flask(__name__) @app.route("/index") # 路由 def index( 阅读全文
posted @ 2019-06-27 10:37 雾霾1024 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1. 单聊的实现 import json from flask import Flask, render_template, request from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSoc 阅读全文
posted @ 2019-06-27 10:13 雾霾1024 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 一. MongoDB的启动 1. 启动MongoDB服务 mongod --dbpath d:\data # 数据库存放路径, 模式c:\data mongod --install # 安装windows服务 mongod --remove # 卸载windows服务 2. 客户端连接 mongo 阅读全文
posted @ 2019-06-26 22:54 雾霾1024 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 一. 须知 序列号seq:占4个字节,用来标记数据段的顺序,TCP把连接中发送的所有数据字节都编上一个序号,第一个字节的编号由本地随机产生;给字节编上序号后,就给每一个报文段指派一个序号;序列号seq就是这个报文段中的第一个字节的数据编号。 确认号ack:占4个字节,期待收到对方下一个报文段的第一个 阅读全文
posted @ 2019-05-19 21:58 雾霾1024 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 1. 配置文件位置:/etc/sysconfig/network-scripts/ifcfg-ens33 1. DEVICE=ens33网卡的名字 2. HWADDR=00:0c:29:90:89:d9 HWADDR HardWare Address 硬件地址 MAC地址 3. TYPE=Ether 阅读全文
posted @ 2019-05-12 17:30 雾霾1024 阅读(3693) 评论(0) 推荐(0) 编辑
摘要: 一. linux简单介绍 linux的优势 可靠的安全性,良好的稳定性,完善的网络功能 跨平台的硬件支持,丰富的软件支持,多用户多任务 Linux的发行版本 Redhat 红帽子,最大稳定 CentOS 免费 openSUSE 安全性高 Ubuntu 兼容性强 二. Linux的安装 1.先安装虚拟 阅读全文
posted @ 2019-04-14 13:18 雾霾1024 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 一. 常用的指令 mkdir -p 创建文件夹 parents递归创建 ls -alh 查看当前目录内容 cd 切换工作目录 pwd 打印当前工作目录 touch 文件名 创建文件 echo 字符串/变量 查看文件或者变量 eg: echo $PATH echo “xxx” >> 文件 写入xxx到 阅读全文
posted @ 2019-04-14 13:05 雾霾1024 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 一. ModelForm ModelForm是根据Model来定制的Form 二. ModelForm的创建 三. class Meta中常用的参数 model = models.Book 对应models中的类 fields = "__all__" 列出所有的字段 exclude = None 排 阅读全文
posted @ 2019-04-14 12:46 雾霾1024 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 一. form表单验证 form可以生成html标签,可以校验,可以保留上次输入内容 1. 创建form表单 from django import forms class MyForm(forms.Form): username = forms.CharField( label = "用户名", # 阅读全文
posted @ 2019-03-14 00:32 雾霾1024 阅读(326) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页