player

Python学习记录贴

一世执手 提交于 2019-12-04 08:01:33
#!/bin/env python #-*- coding:utf8 -*- #学python的记录 #练习一天~ # adict = dict([('name','bob'),('age',25)]) # print(len(adict)) # print(adict) # a = hash(100) #判断给定的数据是不是不可变的,不可变数据才能作为key # print(a) # a = adict.keys() #取出所有字典的key # print(a) # a = adict.values() #取出字典所有的value # print(a) # a = adict.items() #取出key:value对 # print(a) # #get方法常用很重要 # print(adict.get('name')) #取出字典中name对应的value,如果没有则返回None # print(adict.get('qq')) #None # print(adict.get('qq','not found')) #没有qq,返回指定内容:not found # function(){ //外汇返佣:http://www.fx61.com # print(adict.get('age','not found')) # a = adict.update({'phone':

H5同层播放器接入规范

拜拜、爱过 提交于 2019-12-04 06:46:51
技术指南 > H5同层播放器接入规范 H5同层播放器接入规范 x5-video-player-type 启用H5同层播放器 通过video属性“x5-video-player-type”声明启用同层H5播放器 同层页面内播放是标准的视频播放形态,在video标签中添加x5-video-player-type:h5-page属性来控制网页内部同层播放,可以在视频上方显示html元素。 示例: https://tencentx5.github.io/x5/video_page_samelayer.htm 详情可以参考: https://docs.qq.com/doc/DTUxGdWZic0RLR29B x5-video-player-fullscreen全屏方式 视频播放时将会进入到全屏模式 如果不申明此属性,页面得到视口区域为原始视口大小(视频未播放前),比如在微信里,会有一个常驻的标题栏,如果不声明此属性,这个标题栏高度不会给页面,播放时会平均分为两块(上下黑块) 注: 声明此属性,需要页面自己重新适配新的视口大小变化。可以通过监听resize 事件来实现 <video id="test_video" src="xxx" x5-video-player-type="h5" x5-video-player-fullscreen="true"/> 需要监听窗口大小变化(resize

Project Four: Blackjack

一个人想着一个人 提交于 2019-12-04 06:24:59
Project Four: Blackjack Out: Oct. 31, 2019; Due: Nov. 14, 2019 I. Motivation To give you experience in implementing abstract data types (ADTs), using interfaces (abstract base classes), and using interface/implementation inheritance. II. Introduction In this project, we will implement a simplified version of the card game called Blackjack, also sometimes called 21. It is a relatively simple game played with a standard deck of 52 playing cards. There are two participants, a dealer and a player. The player starts with a bankroll, and the game progresses in rounds called hands. At the start of

Unity联网对战游戏小Demo

允我心安 提交于 2019-12-04 02:21:35
前言 开发3D游戏听起来门槛很高,但是Unity的出现让门槛大大降低。开发联网实时对战的3D游戏门槛就更高,因为即便熟悉掌握了Unity的开发技术,联网的游戏还要涉及到熟悉网络协议栈、掌握后端知识以及面对服务器带来的高额成本。但是Bmob最近在内测一款 游戏sdk ,让普通开发者开发一款联网实时对战游戏这个梦想变得触手可及。 第一步,准备一个单机的Unity游戏 访问 Unity 的 Asset Store 下载游戏项目,并且Import到 Unity 内。 我选择了一款可爱的射击打怪游戏: Survival Shooter Tutorial 项目导入后是这个样子的: 下面简要介绍项目结构: 场景上的摆设物体都包括在 Environment 上,比如图上的闹钟、柜子等,它们的 Layer 都设置为了 Shootable 字段,代码在玩家开激光枪、激光碰撞检测时检测到Shootable为Layer的物体才会触发碰撞事件。 怪物的生成由 EnemyManage 来控制,能够管理何种怪物在哪个出生点按什么时间间隔出生。 怪物主要由三个脚本来管理,分别是 EnemyHealth.cs (管理怪物的hp,被玩家射击到时扣血,血量小于等于0时死掉)、 EnemyMovement.cs (管理怪物的移动,用UnityEngine.AI.NavMeshAgent,把玩家的坐标设为目的地

前端视频播放

余生长醉 提交于 2019-12-04 01:22:53
<!-- 视频代码 --> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.1/skins/default/aliplayer-min.css" /> <script charset="utf-8" type="text/javascript" src="https://g.alicdn.com/de/prismplayer/2.8.1/aliplayer-h5-min.js"></script> <div class="prism-player" id="J_prismPlayer"></div> <script> var player = new Aliplayer({ id: 'J_prismPlayer', width: '100%', height: '270px', autoplay: false, // 支持播放地址播放 , 此播放优先级最高 source : '__PUBLIC__/video/cgyd.mp4', }); $("#J_prismPlayer").find("video").attr("poster","__PUBLIC__/img/video_img.png"); </script> <!-- 视频代码 --> 来源: https://www.cnblogs

vue-video-player

眉间皱痕 提交于 2019-12-03 22:42:43
yarn add vue-video-player main.js import VideoPlayer from 'vue-video-player' require('video.js/dist/video-js.css') require('vue-video-player/src/custom-theme.css') Vue.use(VideoPlayer) 完整代码如下 <template> <div> <!--https://github.surmon.me/vue-video-player/--> <video-player class="vjs-custom-skin" ref="videoPlayer" :options="playerOptions" :playsinline="true" @play="onPlayerPlay($event)" @pause="onPlayerPause($event)" @ended="onPlayerEnded($event)" @loadeddata="onPlayerLoadeddata($event)" @waiting="onPlayerWaiting($event)" @playing="onPlayerPlaying($event)" @timeupdate="onPlayerTimeupdate($event

QT视频播放出现的问题

半世苍凉 提交于 2019-12-03 15:59:55
使用QMediaPlayer和QVideoWidget播放视频 添加模块: QT += multimedia QT += multimediawidgets 引用头文件: #include <QMediaPlayer> #include <QVideoWidget> Widget::Widget(QWidget *parent) :   QWidget(parent), ui(new Ui::Widget) {   ui->setupUi(this);   QHBoxLayout *m_layout= new QHBoxLayout(this);   QMediaPlayer *m_player = new QMediaPlayer(this);   m_player->setMedia(QUrl::fromLocalFile(QString::fromLocal8Bit("C:/baituo.mp4")));   QVideoWidget *m_videoW = new QVideoWidget(this);   m_layout->addWidget(m_videoW);   this->setLayout(m_layout);   m_player->setVideoOutput(m_videoW);   m_player->play(); } 代码写起来很简单,编译也能通过

SQL 创建表

坚强是说给别人听的谎言 提交于 2019-12-03 15:46:57
SQL 创建表是通过SQL CREATE TABLE 语句来实现,该语句是DDL SQL语句 。CREATE TABLE语句用于创建用于存储数据的表。在创建表时,可以为列定义主键、惟一键和外键等完整性约束。完整性约束可以在列级或表级定义。对于不同的RDBMS, CREATE语句的实现和语法是不同的。 CREATE TABLE语句语法 CREATE TABLE table_name (column_name1 datatype, column_name2 datatype,... column_nameN datatype); SQL table_name—是表的名称 column_name1, column_name2 ….-是列的名称 datatype -是列的数据类型,比如char、date、number等 例如:如果要创建employee表,语句应该是这样的: CREATE TABLE employee ( id number(5), name char(20), dept char(10), age number(2), salary number(10), location char(10)); SQL 在Oracle数据库中,整数列的数据类型表示为“number”。在Sybase中,它表示为“int”。 Oracle提供了另一种创建表的方法。 CREATE TABLE

COMP228/327

拜拜、爱过 提交于 2019-12-03 14:40:01
COMP228/327 Assignment 1 w/c 21st October 2019 Developing a Mobile App based on the Mastermind game. Your Task You will design and develop an application written in Swift 5 (or later) for iPhone 8. The App will play a version of the game Mastermind (see for details of the game). Rules of the game: 1. A code-maker creates a pattern of four coloured pegs (from six colour choices), and hides it from the player (note that the pattern may contain several pegs of the same colour). 2. The player makes a guess at the code pattern by selecting a sequence of four coloured pegs. 3. If the player’s

python基础

好久不见. 提交于 2019-12-03 11:41:41
/******对象******/ -python面向对象的语言-一切皆对象-程序运行当中,所有的数据都是存储到内存当中然后在运行-对象就是内存中专门从来存储数据的一块区域-对象实际上就是一个容器,专门用来存储数据-像数值、字符串、布尔值、None都是对象对象的结构 - 每个对象中都要保存三种数据 - id(标识) > id用来标识对象的唯一性,每一个对象都有唯一的id > 对象的id就相当于人的身份证号一样 > 可以通过id()函数来查看对象的id > id是由解析器生成的,在CPython中,id就是对象的内存地址 > 对象一旦创建,则它的id永远不能再改变 - type(类型) > 类型用来标识当前对象所属的类型 > 比如:int str float bool 。。。 > 类型决定了对象有哪些功能 > 通过type()函数来查看对象的类型 > Python是一门强类型的语言,对象一旦创建类型便不能修改 - value(值) > 值就是对象中存储的具体的数据 > 对于有些对象值是可以改变的 > 对象分成两大类,可变对象 不可变对象 可变对象的值可以改变 不可变对象的值不能改变,之前学习的对象都是不可变对象变量和对象 - 对象并没有直接存储到变量中,在Python中变量更像是给对象起了一个别名 - 变量中存储的不是对象的值,而是对象的id(内存地址), 当我们使用变量时