mysql-too many connctions
mysql-too many connctions最大连接数12show variables like 'max_connections';set GLOBAL max_connections=1000;
最大睡眠时间12show global variables like 'wait_timeout';set global wait_timeout=300;
springcloud-rest
springcloud-restConfigBean.java1234567@Configurationpublic class ConfigBean { // @Configuration 相当于 spring applicationContext.xml @Bean public RestTemplate getRestTemplate(){ return new RestTemplate(); }}
DeptConsumerController.java12345678910111213141516171819@RestControllerpublic class DeptConsumerController { // 理解:消费者,不应该有service层 // RestTemplate ... 供我们直接调用就可以了! 注册到spring中 // (url,实体:Map, Class<T>, responseType) @Autowired privat ...
springboot整合mybatis
springboot整合mybatispom.xml123456789101112131415161718192021222324252627282930313233<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <depen ...
cv2读取视频通过rtmp推流
cv2读取视频通过rtmp推流cv2_rtmp.py1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192import cv2 as cvimport timeimport subprocess as spimport multiprocessingimport platformimport psutilclass stream_pusher(object): def __init__(self, rtmp_url=None, raw_frame_q=None): # 类实例化的时候传入rtmp地址和帧传入队列 self.rtmp_url = rtmp_url self.raw_frame_q = raw_frame_q fps = 20 # ...
Redis外网访问
Redis外网访问修改 redis 的配置文件,将所有 bind 信息全部屏蔽。123# bind 192.168.1.100 10.0.0.1 # bind 192.168.1.8 # bind 127.0.0.1
关闭保护模式123修改redis的保护模式为no,不启用127.0.0.1:6379> config set protected-mode "no"OK
cv2读取视频并通过post上传
cv2读取视频并通过post上传cv2_post.py1234567891011121314151617181920212223242526272829303132333435363738394041424344454647import cv2import requestsimport osdef video_post(files): response = requests.post("http://127.0.0.1:5000/upload", data=None, files=files, verify=False, stream=True) print("picture upload state: ", response.status_code)def read_video_show(videoName): ...
flask实时播放cv2读取的视频
flask实时播放cv2读取的视频app.py12345678910111213141516171819202122232425262728class VideoCamera(object): def __init__(self, url): self.cap = cv2.VideoCapture(url) def __del__(self): self.cap.release() def get_frame(self): success, image = self.cap.read() ret, jpeg = cv2.imencode('.jpg', image) return jpeg.tobytes()@app.route('/cv2_online')def cv2_online(): return render_template('cv2_online.html')def gen(camera): while True: ...
markdown插入视频
markdown插入视频123456<video id="video" controls="" preload="none" poster="http://media.w3.org/2010/05/sintel/poster.png"> <source id="mp4" src="http://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4"> <source id="webm" src="http://media.w3.org/2010/05/sintel/trailer.webm" type="video/webm"> <source id="ogv" src="http://media.w3.org/2010/05/s ...
vue基础代码(非webpack)
vue基础代码(非webpack)<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="/static/js/axios.js"></script>
<script src="/static/js/vue.js"></script>
<s ...