c语言 "生命游戏"
生命游戏123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101#include<stdio.h>#include<stdlib.h>#include<windows.h>#include<time.h>#define H 30#define W 40int map[H][W]={0};void make_map(void){ int tool; srand((unsigned)time(NULL)); for(int i=1;i<H-1;i++) { for(int j=1;j<W-1;j++) { ...
spring 切入点表达式
切入点表达式切入点表达式作用:知道对哪个类里面的哪个方法进行增强语法结构: execution(<权限修饰符> <返回类型> <类全路径> <方法名称>(<参数列表>) )
举例 1:对 com.atguigu.dao.BookDao 类里面的 add 进行增强1execution(* com.atguigu.dao.BookDao.add(..))
举例 2:对 com.atguigu.dao.BookDao 类里面的所有的方法进行增强1execution(* com.atguigu.dao.BookDao.* (..))
举例 3:对 com.atguigu.dao 包里面所有类,类里面所有方法进行增强1execution(* com.atguigu.dao.*.* (..))
spring AOP 注解开发
AOP 操作(AspectJ 注解)1. 创建类,在类里面定义方法1234public class User { public void add() { System.out.println("add......."); } }
2. 创建增强类(编写增强逻辑)123456//(1)在增强类里面,创建方法,让不同方法代表不同通知类型//增强的类public class UserProxy { public void before() {//前置通知 System.out.println("before......");}
3. 进行通知的配置
在 spring 配置文件中,开启注解扫描12345678910111213<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/bean ...
maven resources过滤
来自@狂神说
pom.xml1234567891011121314151617181920<build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/java</directory&g ...
java与安卓socket通讯
原生java socket通讯server端start.java123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 ...
flask-websocket
项目结构
web-socketiosocketio.js github下载地址
1https://github.com/socketio/socket.io/blob/main/client-dist/socket.io.js
index.html1234567891011121314151617181920212223242526272829<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="/static/js/socketio_v4.5.1.js"></script></head><body></body><script> var websocket_url = 'http://' + documen ...
适用于yolov5的数据集转换
from voc dataset to coco dataset文件结构
1_name_to_num.py123456789101112131415161718import osall_ = os.listdir('all_img')count = 0for i in all_: filename = os.path.join('all_img', i) new_name = os.path.join('all_img', '{}.jpg'.format(count)) #print(filename, new_name) os.rename(filename, new_name) filename = os.path.join('all_xml', i[:-3]+'xml') new_name = os.path.join('all_xml', '{}.xml ...
搭建turn服务器
Ubuntu搭建turn服务器(webrtc ice服务器)阅读别人博客的笔记,测试了好多人的方法,最后这个成功了
原理图
安装gcc环境1which gcc
安全签名
ssl1sudo apt install openssl-devel
生成签名1openssl req -x509 -newkey rsa:2048 -keyout /etc/turn_server_pkey.pem -out /etc/turn_server_cert.pem -days 99999 -nodes
一直回车
安装libevent1wget --no-check-certificate https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
libevent-2.1.12-stable.tar.gz
12345tar -zxvf libevent-2.1.12-stable.tar.gzcd libevent-2.1.12-stable/./c ...
ssmbuild
整合SSM来自@狂神说
准备环境:
IDEA
MySQL 5.7.19
Tomcat 9
Maven 3.6
要求:
需要熟练掌握MySQL数据库,Spring,JavaWeb及MyBatis知识,简单的前端知识;
数据库环境
创建一个存放书籍数据的数据库表1234567891011121314CREATE DATABASE `ssmbuild`;USE `ssmbuild`;DROP TABLE IF EXISTS `books`;CREATE TABLE `books` (`bookID` INT(10) NOT NULL AUTO_INCREMENT COMMENT '书id',`bookName` VARCHAR(100) NOT NULL COMMENT '书名',`bookCounts` INT(11) NOT NULL COMMENT '数量',`detail` VARCHAR(200) NOT NULL COMMENT '描述',KEY `bookID` (`bookID`)) EN ...
SpringMVC终极乱码过滤器
来自@狂神说
filter.java123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106import javax.servlet.*;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRequestWrapper;import javax.servlet.http.HttpServletResponse;import java.io.IOException;import java.io.UnsupportedEncodingException;import java.util.Map;/*** 解决get和po ...