- 博客(20)
- 资源 (2)
- 收藏
- 关注
原创 numberInput一段时间内多次点击按钮 以最后一次点击发送
点击numberInput后,并不直接执行,而是初始化定时器时间,启动定时器。当快速多次点击后,点击时,都会初始化定时器时间,造成不断重新初始化,定时器并不执行操作,只有一段时间不点击,定时器时间到了就执行相关的操作即可。 let timer_temp = null; numberInput.render('#set'+tempData.id, { // 最小值 ..
2021-09-02 09:08:32
316
原创 layui table使用xmselect HTMLCollection length 0 select更改背景颜色
HTMLCollection 为0的原因为:,渲染之前打印的这个数组,看到的是渲染后的数据,通俗的讲,就是这个dom结构还没加载完,js就执行了,解决办法就等dom结构加载完成后再去获取这个数组。layui中 table 使用 改变select背景颜色 或者使用xmselect解决方法效果图:templet:<script type="text/html" id="controlModel"> <div id="{{ d.id }}"><..
2021-09-01 08:59:20
2106
原创 ngnix+uwsgi 504 Gateway Time-out
/etc/ngnix 下的nginx.conf最下面添加以下配置uwsgi_read_timeout 600;
2021-07-06 18:04:29
174
原创 vue vue-element-admin框架使用记录
vue文件引入路径@xxx vue.config.js configureWebpack: { // provide the app's title in webpack's name field, so that // it can be accessed in index.html to inject the correct title. name: name, resolve: { alias: { '@': resol..
2020-12-29 16:51:28
439
原创 vue水波纹点击效果
引用组件:import WaveItem from './components/waves'components: { WaveItem },app.vue最上部 <wave-item/>//waves.vue<template> <div data-tname="WaveItem"> <div class="main-container"> <div class="waves"> &l.
2020-11-13 10:58:26
1295
原创 Django3+celery4.4报错DatabaseWrapper objects created in a thread can only be used in that same thread.
执行异步任务时报错:django.db.utils.DatabaseError: DatabaseWrapper objects created in a thread can only be used in that same thread. The object with alias 'default' was created in thread id 2068603070080 and this is thread id 2069065236128.解决方法:原先启动命令:celery
2020-09-02 19:27:12
1653
3
转载 Celery(异步任务,定时任务,周期任务)
Celery的异步from celery import Celeryimport time# 创建一个Celery实例,这就是我们用户的应用appmy_task = Celery("task", broker="redis://127.0.0.1:6379", backend="redis://127.0.0.1:6379")# 为应用创建任务,func1,2,3@my_task.taskdef my_func1(a, b): time.sleep(20) retu
2020-09-01 19:41:53
862
原创 pandas整列时间戳转上海时间
0 1 2 3 4 58703 1597042824370 2 1 4 1 18704 1597042829380 2 1 4 1 18705 1597042834397 2 1 4 1 18706 1597042839529 2 1 4 1 18707 1597042844495 2 1 4 1 1... ... .. .. .. .. ..9698 1597...
2020-08-15 13:05:56
413
原创 highcharts 动态刷新图标多个曲线
Highcharts.setOptions({ global: { useUTC: false }});function activeLastPointToolip(chart) { var points = chart.series[0].points; chart.tooltip.refresh(points[points.length -1]);}var chart = Highcharts.chart('container_change', .
2020-08-11 20:32:22
473
原创 scrapy爬虫Linux部署anaconda+Supervisor+scrapyd+SpiderKeeper
一、anaconda安装进入Anaconda的官网进行下载或学习。 在Linux里面.sh文件是可执行的脚本文件,需要用命令bash来进行安装。 此时我们输入命令bash Anacondaxxxxx-Linux-x86_64.sh 配置环境变量: vi/etc/profile 最后添加 export ANACONDA_HOME=/root/anaconda3/...
2020-03-18 11:41:58
352
原创 pandan 处理Excel 数据存入数据库与取出转换为DataFrame
转为数组存入数据库,取出数据为数组形式字符串,用eval函数处理得到数组后转为Dataframe格式进行快速条件查询
2019-12-26 16:44:46
684
原创 Django restful 序列化忽略空值或者返回空字符串方法
现在的结果是:{"xx":{"aa":"0.9","vv":null}}想要的结果是:{"xx":{"aa":"0.9",}}from collections import OrderedDictfrom operator import itemgetter class Meta: model = xxx fi...
2019-12-18 16:10:00
1201
转载 详解Django的CSRF认证实现
什么是 CSRFCSRF, Cross Site Request Forgery, 跨站点伪造请求。举例来讲,某个恶意的网站上有一个指向你的网站的链接,如果某个用户已经登录到你的网站上了,那么当这个用户点击这个恶意网站上的那个链接时,就会向你的网站发来一个请求,你的网站会以为这个请求是用户自己发来的,其实呢,这个请求是那个恶意网站伪造的。1.csrf原理csrf要求发送post,put...
2019-12-16 11:43:56
431
转载 python进阶100模块汇总
python进阶★☆☆☆☆:较少被用到★★☆☆☆:重要但较少被用到★★★☆☆:解决特定问题不可或缺★★★★☆:主流应用,优先学习★★★★★:同类模块最优,或学习优先级最高No.来源模块说明分类推荐指数1标准库os文件和路径操作功能基础类★★★★★2标准库sys系统和环境相关功能基础类★★★☆☆3标准库time时间库...
2019-11-20 16:21:29
230
转载 Django request各种操作
request根据请求的信息获取base url(有时候服务的域名比较多,还是需要动态的拼接一下url信息)# url http://wificdn.com:8888/wxpay/qrcode2/16122010404238801544?name=lzzrequest.get_host() # wificdn.com:8888request.get_full_path() # u'/...
2019-11-06 15:48:29
442
原创 win系统使用pipenv编码问题:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 38: invalid s
win系统使用pipenv install时编码问题:Failed creating virtual environment[pipenv.exceptions.VirtualenvCreationException]: File "e:\pythontools\anaconda3\lib\site-packages\pipenv\cli\command.py", line 254, i...
2019-10-10 09:14:00
642
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人