上一页 1 ··· 82 83 84 85 86 87 88 89 90 ··· 96 下一页
摘要: 内存管理机制(垃圾回收机制) 对象分类: 定长: int / float #define _PyObject_HEAD_EXTRA \ struct _object *_ob_next; \ struct _object *_ob_prev; ​ typedef struct _object { _ 阅读全文
posted @ 2019-12-08 11:31 干it的小张 阅读(218) 评论(0) 推荐(0)
摘要: 什么是跨域?由于浏览器具有同源策略的限制,所以在浏览器发送 Ajax 请求时,当前域名和ajax请求发送的域名不通,则浏览器会阻止. 如何解决跨域? cors,本质上通过设置响应头来解决(主流的方式). [代码实例] jsonp,用巧妙的方式绕过浏览器同源策略的限制. (只能发GET请求) [代码实 阅读全文
posted @ 2019-12-08 11:02 干it的小张 阅读(125) 评论(0) 推荐(0)
摘要: from django.conf.urls import urlfrom django.contrib import adminfrom app01 import viewsurlpatterns = [ url(r'^admin/',admin.site.urls), url(r'^index/' 阅读全文
posted @ 2019-12-07 16:00 干it的小张 阅读(155) 评论(0) 推荐(0)
摘要: import pymysqlfrom DBUtils.PooledDB import PooledDB, SharedDBConnectionPOOL = PooledDB ( creator=pymysql, # 使用链接数据库的模块 maxconnections=10, # 连接池允许的最大连接 阅读全文
posted @ 2019-12-07 15:02 干it的小张 阅读(124) 评论(0) 推荐(0)
摘要: import smtplibfrom email.mime.text import MIMETextfrom email.utils import formataddr#定义发送的内容:msg = MIMEText("你好","plain","utf-8")#定义邮件标题:msg['subject' 阅读全文
posted @ 2019-12-07 11:50 干it的小张 阅读(158) 评论(0) 推荐(0)
上一页 1 ··· 82 83 84 85 86 87 88 89 90 ··· 96 下一页