h2

在spring中使用Hibernate5

谁说胖子不能爱 提交于 2019-11-29 13:54:38
[TOC] 1. Overview In this article, we’ll discuss how to bootstrap Hibernate 5 with Spring , using both Java and XML configuration. 2. Spring Integration Bootstrapping a SessionFactory with the native Hibernate API is a bit complicated and would take us quite a few lines of code (have a look at the official documentation in case you really need to do that). Fortunately, Spring supports bootstrapping the SessionFactory – so that we only need a few lines of Java code or XML configuration. Also, before we jump in, if you’re working with older versions of Hibernate, you can have a look at the

Grails accessing H2 TCP server hangs

人盡茶涼 提交于 2019-11-29 13:38:20
I have a Grails app which works fine when using the default embedded H2 database. Now I'd need to run some tests where I need more integrated environment, so I thought of using H2 in server mode for this and making my other apps access the same DB. I start the H2 server from command line and get tcp://192.168.56.1:9092 for the server URL. I've set it in Grails datasource as jdbc:h2:tcp://localhost:9092/~/devDb;IFEXISTS=TRUE . Once I start the Grails app, it simply hangs. The log file is empty. I've tried the URL with external DB client and can verify that the server is working. When server is

云游戏的架构设计和技术实现

大城市里の小女人 提交于 2019-11-29 13:14:27
首先简单做个自我介绍。我本人主要是从事游戏行业的,经历比较复杂,早年做 PC 端网游,然后又做了几年虚拟现实,接着又做页游和手游, 现在主要是做 HTML5 游戏。这跟云计算可能有点远,但是我个人对云计算技术很感兴趣,所以业余也会关心这项技术的发展。所以就有了这样一个游戏和云计算相结合的项目,这是我去年跟上海劢驰数字技术有限公司合作的项目,我作为技术顾问参与了这个项目的架构设计和一些核心技术的研发。 什么是云游戏? 云游戏这个概念非常简单,就是我把游戏放到服务器上去运行,把游戏渲染出来的的音视频画面,通过流的形式传送到终端,终端上不再需要安装游戏,各种终端比如说电视、手机、PC、平板都可以运行。这样我们就不需要关心游戏怎么去适配不同的软硬件平台、终端性能够不够等等这些问题。这个概念本身是非常好的,在2009年的时候,这个技术就已经出现了,美国有家叫Onlive 的公司第一个推出云游戏服务,但是他最终在商业上还是失败了,技术最后被索尼公司收购,并运用在PS Now上。云游戏的概念虽然非常好,但里面技术挑战性非常高,有非常多的技术问题需要解决,那个时代可能还比较早,软硬件都还不太成熟,所以最后没有能够成功的商业化。到了现在这个时间点上,云游戏技术开始慢慢成熟起来,已经具备了商业化的基础。 下面是对我们产品的介绍。对云游戏来说,用户主要会关心延迟问题,玩一个对抗性很强的游戏

Error using Hibernate with H2 in memory database

半世苍凉 提交于 2019-11-29 11:23:01
问题 I'm working with Hibernate. How can I configure my persistence.xml to have an H2 in-memory database? My persistence.xml is: <?xml version="1.0" encoding="UTF-8" ?> <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"> <persistence-unit name="persistenceUnit" transaction-type="RESOURCE_LOCAL"> <class

selenium2java一个弹框上传时间日期大杂烩测试用例

£可爱£侵袭症+ 提交于 2019-11-29 08:56:43
本人在学习selenium2java的时候,遇到过一个弹框上传大杂烩的用例,特别是有一个选时间的,得先选时,再选分。费死老劲了重要写完,没啥大坑,就是比较复杂。 //生成班课 public static void createFormalCourseAndSale(WebDriver driver, String grade, String subject) throws InterruptedException { clickCourse(driver); clickFormalCourse(driver); clickAddCourse(driver); findElementByIdAndClearSendkeys(driver, "input-title", "测试班课"+grade+subject);//输入课程标题 findElementByIdAndClick(driver, "button-toggle-grade");//选择年级 findElementByTextAndClick(driver, grade); findElementByIdAndClick(driver, "button-toggle-subject");//选择科目 findElementByTextAndClick(driver, subject);

html、css文字加粗方法

我只是一个虾纸丫 提交于 2019-11-29 08:09:43
一般来说前端加粗字体的方法有两种,一个是html标签加粗的方法,另一个是css加粗字体的方法,还有一个是字体加粗方法。前两个是我们最常用的方法,后一个感觉有点非主流的方法,也不知道我是怎么想到这种方法的,有点为自己的智商感到悲伤,下面给大家详细的介绍一下。 一、标签方法加粗文字 1、h(1~6标签)书写方式 <h1>h1标签 -> CGLweb前端</h1> <h2>h2标签 -> CGLweb前端</h2> <h3>h3标签 -> CGLweb前端</h3> <h4>h4标签 -> CGLweb前端</h4> <h5>h5标签 -> CGLweb前端</h5> <h6>h6标签 -> CGLweb前端</h6> 2、页面效果 h1标签 -> CGLweb前端 h2标签 -> CGLweb前端 h3标签 -> CGLweb前端 h4标签 -> CGLweb前端 h5标签 -> CGLweb前端 h6标签 -> CGLweb前端 2、strong标签 <strong>strong标签 -> CGLweb前端</strong> strong标签 -> CGLweb前端 3、b标签 <b>b标签 -> CGLweb前端</b> b标签 -> CGLweb前端 这其中我们一般是使用strong来加粗的,原因如下,b标签现在已经是废弃标签,所以我们就不用了。 h标签一般用在SEO优化的

视频播放ts hls m3u8 playbackRate

女生的网名这么多〃 提交于 2019-11-29 07:45:15
<script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js"></script> <video id="video"></video> <script> if(Hls.isSupported()) { var video = document.getElementById('video'); var hls = new Hls(); hls.loadSource('http://www.streambox.fr/playlists/test_001/stream.m3u8'); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED,function() { video.play(); }); } </script> ffmpeg -i e785b2c81c9e018296671a1287e99615_2.mp4 -codec copy -vbsf h264_mp4toannexb -map 0 -f segment -segment_list out.m3u8 -segment_time 10 out%03d.ts <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge

flv、MP4 视频播放问题

对着背影说爱祢 提交于 2019-11-29 07:25:00
我们平常笼统说的「视频格式」其实包含三个部分:视频编码、音频编码、容器格式。其中「编码」这个概念其实又包含两个方面:编码和解码。「视频编码」作为动词指的是将动态的图像信息转化为二进制数据的过程;其逆过程称为「视频解码」。「视频编码」作为名词则通常指的是某种特定的编码方式。同样的概念也适用于「音频编码」,只不过它转化的是声音信息。大多数「视频文件」都同时包含视频和音频,因此编码后至少都有两组二进制数据,并且两组数据必须按照特定的方式同步起来,否则我们看到的画面和听到的声音将不吻合。为了解决编码后多组不同类型的的数据的存储、传输问题,需要将他们按照一定的规律组织起来,这种组织方式即是「容器格式」。 我们常见的视频文件扩展名包括 .avi, .rmvb, .mp4, .mkv 等。其实扩展名都是指的某种容器格式。这些容器里面存放的数据可能采用了多种不同的编码方式。例如,常见的 avi 文件里面存放的通常是 xvid 或 divx 编码的视频和 mp3 编码的音频。rmvb 文件里面存放的通常是 RV40 编码的视频和 cook 编码的音频。mp4 文件里面通常存放的是 H.264 编码的视频和 AAC 编码的音频。mkv 文件里面存放的则可能包含前面各种。 目前业界主流的封装是MP4.因为MP4有着良好的特性,并对HTML5友好。mp4新规范实际已经支持无缝拼接,真正流媒体封装器

H2 Database multiple connections

一笑奈何 提交于 2019-11-29 06:39:57
I have the following issue: Two instances of an application on two different systems should share a small database. The main problem is that both systems can only exchange data through a network-folder. I don't have the possibilty to setup a database-server somewhere. Is it possible to place a H2 database on the network-folder and let both instances connect to the database (also concurrently)? I could connect with both instances to the db using the embedded mode if I disable the file-locking, right? The instances can perfom either READ or INSERT operations on the db. Do I risk data corruptions

Convert MySQL script to H2

好久不见. 提交于 2019-11-29 05:54:32
问题 I have an init script for my MySQL database but for test purposes I wan't to use a H2 database. Anyone knows how to convert the file or at least has a list of the syntax differences ? thanks. 回答1: There are a number of database tools that help migrating data from one to another database, for example: Flyway SQuirreL DB Copy Plugin 回答2: Here is a good instruction by Matthew Casperson Exporting from MySQL to H2 Here is a short list of steps, to convert from mysql to h2: Fix up single quotes