Hibernate(二) 数据库的操作 增删查改

一,Hibernate APIConfigurationSessionFactorySessionTransactionQuery二,知识点1.读取并解析配置文件及映射文件Configuration conf=new Configuration().configure(); 2.依据配置文件和映射文件的信息,创建SessionFactorySessionFactory sf=conf.buildS...
分类: 其他 发布时间: 08-05 23:21 阅读次数: 0

Hibernate(三) Junit 测试 ,创建 模板

一,Junit 测试1.创建一个测试类    选择自己要测试的类->右击 new ->other ->java  ->JUnit ,JUnit Text Case   ->Source folder,Package 选择创建的路径   2. assertEquals(expected, actual) 断言    在测试的方法里可以使用 断言 来进行测试,如:    ...
分类: 其他 发布时间: 08-05 23:21 阅读次数: 0

Swagger2 配置

一.填入依赖<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.2.2</version> </dependency> <de
分类: 其他 发布时间: 08-05 23:21 阅读次数: 0

Spring Boot(九) @Enable*注解的工作原理

 1. @EnableConfigurationProperties 0.是用来启用一个特性,这个特性就是,可以把配置文件的属性注入到bean里面去,一般是要和@ConfigurationProperties一起使用 1.Demo 1.在启动类里加上 @EnableConfigurationProperties 注解(@SpringBootConfiguration 里有这个注解) @Ena...
分类: 其他 发布时间: 08-05 23:21 阅读次数: 0

Spring Boot(十) @EnableAutoConfiguration深入分析

 0. @EnableAutoConfiguration 1.@EnableAutoConfiguration 作用:从classpath中搜索所有META-INF/spring.factories配置文件。然后,将其中org.springframework.boot.autoconfigure.EnableAutoConfiguration key对应的配置项加载到spring容器。 2.只有s...
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

将HTML转义为实体,将实体转回为HTML

// 将HTML转义为实体 function escape(html){ var elem = document.createElement('div') var txt = document.createTextNode(html) elem.appendChild(txt) return elem.innerHTML; } // 将实体转回为HTML fun...
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

JavaScrit 对 URI 进行 编码 /解码

实例 <script type="text/javascript"> var test1="http://www.w3school.com.cn/My first/" document.write(encodeURI(test1)+ "<br />") document.write(decodeURI(test1)) </script> 输出: ..
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

Spring Boot(十一) 事件监听

1.事件流程     1.自定义事件,一般是继承ApplicationEvent抽象类     2.定义事件监听器,一般是实现ApplicationListener接口        启动时,需要把监听器加入到Spring容器中     4.发布事件,使用 ApplicationEventPublisher.publishEvent 发布事件    2.配置监听器 4种方法     1...
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

JavaScript的filter用法

Js的有些操作会改变原来的对象;有些操作则不会改变原来对象。 数组的filter方法就不会改变原来数组 利用filter,可以巧妙地去除Array的重复元素: 'use strict'; var r, arr = ['apple', 'strawberry', 'banana', 'pear', 'apple', 'orange', 'orange', 'strawberry']; r = arr.filter(function (element, index, self) { return
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

spring cloud: 升级到spring boot 2.x/Finchley.RELEASE遇到的坑

spring boot2.x已经出来好一阵了,而且spring cloud 的最新Release版本Finchley.RELEASE,默认集成的就是spring boot 2.x,这几天将一个旧项目尝试着从低版本升级到 2.x,踩坑无数,记录一下: 一、gradle的问题 spring boot 2.x 要求gradle版本不能太旧,先把gradle升级到4.6版本,然后编译,各种问题,到gradle官网上查了下,build.gradle有几个小地方要调整 1.1 java-libary 的项
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

D. Vasiliy's Multiset 异或字典树

D. Vasiliy's Multiset time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Author has gone out of the stories about Vasiliy, so here is just a formal task description. You are given q queries
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

【linux】linux中tree的安装

# 2018/7/29 10:17:46测试成功! 一 Tree命令简介   tree是一种递归目录列表命令,产生一个深度缩进列表文件。 二 Tree命令安装 1.下载安装包,地址:http://mama.indstate.edu/users/ice/tree/ 2.解压安装 1)Linux环境(CentOS 6.0, 7.0)下安装 a.解压tree-1.7.0.tgz文件,命令:tar -zxvf tree-1.7.0.tgz -C ./ b.进入解压目录中,命令:cd tree-1.7.
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

Linux---nginx+ffmpeg搭建流媒体服务器

原帖地址:https://blog.csdn.net/loyachen/article/details/50907828 这里实现了简单nginx+ffmpeg 推本地mp4视频文件的功能,以后将会继续更新 环境 系统环境:CentOS release 6.7 (Final) 需求 利用nginx和ffmpeg搭建流媒体服务器 步骤 安装ffmpeg 安装过程可以参考:centos编译安装ffmpeg:http://blog.csdn.net/loyachen/article/details/
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

关于python中的tkinter模块

python2.7和python3.6中的tkinter是两个包,不会自动升级,假如在fedora28做开发的话, 错误:用import Tkinter /import tkinter /import _tkinter 都会失败, 网上的解决办法:   1.yum install python-tk //这里默认安装哪一个不清楚,可能2.7,如果用的是3.6解释就会出错   2.一般会说不是包没有安装,而是需要重新编译安装python3.6,试过失败了   自己找到的:yum list pyt
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

v-charts显示标题

使用v-charts的时候,如果要显示标题需要以下操作 1. 加入:title props <ve-pie :title="chartTitle" :data="chartData"></ve-pie>  2. 引入title组件 import "echarts/lib/component/title";
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

随笔文件

from utils.check_code import create_validate_code 自己创建验证码 def xxxx(request): 1. f=open(1.png,'wb')图片存在本地 img,code=create_validate_code() request.session['check_code']=code img.save(f,'PNG') f.close() HttpResponse('......') def xxxx(request): 2.f=Byt
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

Linux - 目录结构及文件操作

根目录 “/”:Linux 系统中最高层的目录 这个就是根目录 用 / 表示根目录 bin 目录:存放可执行文件 [root@sch01ar bin]# ls [ mc-wait-for-name a2p md5sum ab mdel abrt-action-analyze-backtrace
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

Educational Codeforces Round 38 (Rated for Div. 2) B. Run For Your Prize

B. Run For Your Prize time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You and your friend are participating in a TV show "Run For Your Prize". At the start of the show n prizes are located
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

Nginx学习之配置RTMP模块搭建推流服务

原帖地址:https://www.cnblogs.com/smallSevens/p/8191238.html 写在开始 小程序升级实时音视频录制及播放能力,开放 Wi-Fi、NFC(HCE) 等硬件连接功能。同时提供按需加载、自定义组件和更多访问层级等新特性,增强了第三方平台的能力,以满足日趋丰富的业务需求。 为更高效地连接用户与商家,小程序提供了实时音视频录制及播放组件。符合类目要求的小程序自助开通后,可自建或使用云服务,实现单向、双向甚至多向的音视频功能,如在线授课、远程咨询、视频客服,
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0

普通函数和函数模板在一起研究

1.函数模板和普通函数在一起的研究 1) 2)
分类: 其他 发布时间: 08-05 23:20 阅读次数: 0