摘要: 本章概要 1. 什么是线程? 2. 线程与进程的区别? 3. .net如何开启多线程? 4. Tread多线程 5. 委托异步调用 6. Timer类的使用 7. ThreadPool线程池 一.什么是线程? 线程,顾名思义,就是一条流水线工作的过程(流水线的工作需要电源,电源就相当于cpu),而一 阅读全文
posted @ 2018-11-12 21:37 Super-Yan 阅读(269) 评论(0) 推荐(0) 编辑
摘要: class in_out_ref { #region in 关键字 delegate void DContravariant(A argumen); static void objFunction(object obj) { Console.WriteLine("你变了"); } ... 阅读全文
posted @ 2018-11-01 16:34 Super-Yan 阅读(1070) 评论(1) 推荐(0) 编辑
摘要: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', }, }, 'log 阅读全文
posted @ 2018-10-31 21:36 Super-Yan 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 跨域 由于同源策略导致的不同源网站间页面脚本无法互相访问。 同源策略 出于安全性考虑,一个网站的脚本不能访问另一个网站的请求。除非它们的协议号,域名,端口号相同。 防跨域 同源策略条件过于严苛,很多网站都有子域名,这样就造成了互相通信不便的问题。 解决方案 一.document.domain doc 阅读全文
posted @ 2018-10-22 23:27 Super-Yan 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 原文链接:scrapy-redis使用以及剖析 原文链接:scrapy-redis使用以及剖析 阅读全文
posted @ 2018-10-21 20:36 Super-Yan 阅读(90) 评论(0) 推荐(0) 编辑
摘要: api import socket import select class MySock: def __init__(self, sock, data): self.sock = sock self.data = data def __getattr__(self, item): return ge 阅读全文
posted @ 2018-10-20 11:05 Super-Yan 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 服务端 from socket import import selectors sel = selectors.DefaultSelector() def accept(server_fileobj, mask): conn, addr = server_fileobj.accept() sel.r 阅读全文
posted @ 2018-10-20 11:02 Super-Yan 阅读(249) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-10-14 14:24 Super-Yan 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Cookie、Session简介: Cookie、Session是一种会话跟踪技术,因为http请求都是无协议的,无法记录上一次请求的状态,所以需要cookie来完成会话跟踪,Seesion的底层是由Cookie实现的。 Cookie概述 服务器端设置Cookie,发送给客户端浏览器,客户端保存Co 阅读全文
posted @ 2018-10-09 16:31 Super-Yan 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 客户端发送请求 客户端(浏览器) → 发送请求 → 服务器(wsgi) → 解析请求 → 服务器(Middleware) → process_request → 服务器(urls) → 通过路由寻view → 服务器(view) → 执行方法,提取数据库数据,渲染html模板 → 服务端返回请求 服 阅读全文
posted @ 2018-10-09 15:25 Super-Yan 阅读(126) 评论(0) 推荐(0) 编辑