首页 |  我的博客 |  查看该博主内容分类 | 
上一页 1 ··· 8 9 10 11 12
摘要: 将EventPolicy改为EventLoopPolicy。 同时注意自己文件的命名不要与uvloop重复了,笔者暂时没犯这种错误。 搜了全网都搜不到,难道没人用吗,幸好看了点源码还能看懂点,并且经实践也没什么问题。 为什么技术无法进步,很大原因是愿意分享的人太少了,闭门造车。 阅读全文
posted @ 2022-09-26 12:24 Z哎呀 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 1. 原因 外网原因无法下载 2. 解决办法 下载sqlite-jdbc-3.39.2.0.jar,放这个目录下:C:\用户\你的用户名\AppData\Roaming\JetBrains\PyCharm2021.1\jdbc-drivers\Xerial SQLiteJDBC\3.39.2,3.3 阅读全文
posted @ 2022-09-21 15:03 Z哎呀 阅读(1271) 评论(0) 推荐(2) 编辑
摘要: 1. 原因 可能是浏览器已经提前退出,但此时selenium又尝试使用该浏览器而报错 2. 解决办法 排查代码是否在浏览器退出后,是否又引用了浏览器。 阅读全文
posted @ 2022-09-20 10:38 Z哎呀 阅读(1083) 评论(0) 推荐(0) 编辑
摘要: 1. 安装https支持包 pip3 install django-extensions pip3 install django-werkzeug-debugger-runserver pip3 install pyOpenSSL 2. 在settings中添加 INSTALLED_APPS = [ 阅读全文
posted @ 2022-09-19 21:11 Z哎呀 阅读(696) 评论(0) 推荐(0) 编辑
摘要: 1. 原因: 使用了多线程,多线程共享了同一个数据库连接,但每个execute前没有加上互斥锁 2. 方法: 方法一:每个execute前加上互斥锁 lock.acquire() cursor.execute(command,data) lock.release() 方法二: 每个线程拥有自己的数据 阅读全文
posted @ 2022-09-17 15:34 Z哎呀 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 1. 使用连接池 pip install django-db-connection-pool DATABASES = { 'default': { # 'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'dj_db_conn_pool.backends. 阅读全文
posted @ 2022-09-17 15:17 Z哎呀 阅读(618) 评论(0) 推荐(0) 编辑
摘要: nginx配置文件未配置正确 server_name = xx.xx.xx.xx # 注意地址是否正确 # 注意配置的端口号,端口80时可省略端口:xx.xx.xx.xx[:80] listen 80 # 注意路由转发端口是nginx端口,不是uwsgi转发端口(如8000) <-- 错的较多 lo 阅读全文
posted @ 2022-09-15 23:10 Z哎呀 阅读(952) 评论(0) 推荐(0) 编辑
摘要: 在settings.py加上: os.environ['DJANGO_ALLOW_ASYNC_UNSAFE'] = 'true' 允许异步模式 阅读全文
posted @ 2022-09-15 22:19 Z哎呀 阅读(1139) 评论(0) 推荐(0) 编辑
摘要: 原因分析: Bootstrap只要正常引用了样式文件(可通过点击样式连接查看是否能打开),或者本地文件引用的情况下,要注意样式引用的地址是否正确,在django中常见原因是地址引用错误。 如下html的引用: <!-- Bootstrap CSS--> <link rel="stylesheet" 阅读全文
posted @ 2022-09-13 19:15 Z哎呀 阅读(1018) 评论(0) 推荐(0) 编辑
摘要: 主要是selenium在线上部署时常见的google-chrome问题,只要加上一些配置即可。 option.add_argument('--no-sandbox') option.add_argument('--disable-dev-shm-usage') option.add_argument 阅读全文
posted @ 2022-09-11 14:33 Z哎呀 阅读(2834) 评论(0) 推荐(2) 编辑
上一页 1 ··· 8 9 10 11 12
// let homeEle = document.querySelector('body') // homeEle.setAttribute('id', 'particles-js') // /* ---- particles.js config ---- */ // particlesJS("particles-js", { // "particles": { // "number": { // "value": 380, // "density": { // "enable": true, // "value_area": 800 // } // }, // "color": { // "value": "#ffffff" // }, // "shape": { // "type": "circle", // "stroke": { // "width": 0, // "color": "#000000" // }, // "polygon": { // "nb_sides": 5 // }, // "image": { // "src": "img/github.svg", // "width": 100, // "height": 100 // } // }, // "opacity": { // "value": 0.5, // "random": false, // "anim": { // "enable": false, // "speed": 1, // "opacity_min": 0.1, // "sync": false // } // }, // "size": { // "value": 3, // "random": true, // "anim": { // "enable": false, // "speed": 40, // "size_min": 0.1, // "sync": false // } // }, // "line_linked": { // "enable": true, // "distance": 150, // "color": "#ffffff", // "opacity": 0.4, // "width": 1 // }, // "move": { // "enable": true, // "speed": 6, // "direction": "none", // "random": false, // "straight": false, // "out_mode": "out", // "bounce": false, // "attract": { // "enable": false, // "rotateX": 600, // "rotateY": 1200 // } // } // }, // "interactivity": { // "detect_on": "canvas", // "events": { // "onhover": { // "enable": true, // "mode": "grab" // }, // "onclick": { // "enable": true, // "mode": "push" // }, // "resize": true // }, // "modes": { // "grab": { // "distance": 140, // "line_linked": { // "opacity": 1 // } // }, // "bubble": { // "distance": 400, // "size": 40, // "duration": 2, // "opacity": 8, // "speed": 3 // }, // "repulse": { // "distance": 200, // "duration": 0.4 // }, // "push": { // "particles_nb": 4 // }, // "remove": { // "particles_nb": 2 // } // } // }, // "retina_detect": true // }); // var count_particles, stats, update; // stats = new Stats; // stats.setMode(0); // stats.domElement.style.position = 'absolute'; // stats.domElement.style.left = '0px'; // stats.domElement.style.top = '0px'; // document.body.appendChild(stats.domElement); // count_particles = document.querySelector('.js-count-particles'); // update = function() { // stats.begin(); // stats.end(); // if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) { // count_particles.innerText = window.pJSDom[0].pJS.particles.array.length; // } // requestAnimationFrame(update); // }; // requestAnimationFrame(update);