player

Programming Fundamentals (48023)

余生颓废 提交于 2019-11-30 22:53:21
Programming Fundamentals (48023) Spring 2019 Assignment Page 1 1 Programming Fundamentals (48023) – Assignment 4 Everything on this page down to the dashed line is extracted from the subject outline, plus some 5 annotations in boxes … 6 7 Assessment task 2: Assignment 8 Weight: 30% 9 Task: .... This assignment is an individual work. 10 11 Due: The assignment is due at 11:59pm Friday October 18, 2019 (i.e. 18/10/2019, 11:59pm). 12 However, to be eligible to receive a mark for the assignment, a student must have 13 completed all the pass/fail AND additional lab tests by the last lab session of

CSSE1001/7030

元气小坏坏 提交于 2019-11-30 16:30:47
Assignment 3 CSSE1001/7030 Semester 2, 2019 Version 1.0.0 20 marks Due Friday 18th October, 2019, 20:30 Introduction The goal of this assignment is to extend the existing support code of a mario style 2D-platformer written in Python using tkinter. To be successful in completing this assignment you will have to use the concepts and skills that you have learnt. Specifically, you will need to have a good understanding of GUI programming, inter-class interactions, extending classes and file IO. This document outlines the tasks that you will need to implement for this assignment. Getting Started

LeetCode 1097. Game Play Analysis V

孤街浪徒 提交于 2019-11-30 15:18:28
1、题目描述 We define the install date of a player to be the first login day of that player. We also define day 1 retention of some date X to be the number of players whose install date is X and they logged back in on the day right after X, divided by the number of players whose install date is X, rounded to 2 decimal places. Write an SQL query that reports for each install date, the number of players that installed the game on that day and the day 1 retention. The query result format is in the following example: Activity table: player_id device_id event_date games_played 1 2 2016-03-01 5 1 2 2016

iOS开发之视频播放功能、边播放边缓存

走远了吗. 提交于 2019-11-30 00:41:18
最近新做一个类似奖励视频的内置视频播放功能,并且实现边下载边播放,缓存后下次直接播放本地视频,自动适应横竖屏展示,给大家分享下核心代码 有不太清楚的地方可以加我微信一起探讨、主要六个文件如下 ECGRewardVideoView.h、 ECGRewardVideoView.m ECGPlayVideoResourceLoaderDelegate.h ECGPlayVideoResourceLoaderDelegate.m ECGPlayVideoRequestTask.h ECGPlayVideoRequestTask.m 代码如下,直接复制粘贴会有报错地方,但是我觉得你们肯定一看就懂的哈,如有不懂记得微信交流。 外部调用代码 参数说明:url-视频url、duration-播放时间、width-视频宽度、height-视频高度。 [[ECGRewardVideoView sharedInstance] showInsideRewardVideoWithUrl:url duration:duration width:width height:height]; ECGRewardVideoView.h代码,这是一个继承单例类 #import <UIKit/UIKit.h> #import "ECGBaseSingleInstance.h" @interface

Android开发项目:CloudShare

孤街浪徒 提交于 2019-11-29 10:43:51
这个项目在放寒假前就开始在搞了,然后寒假用了一个月时间把界面完全改掉,本身是仿CM Music Player的holo风格,但是觉得不太好操作,所以改成了现在比较流行的title bar + bottom tab的界面。采用了自己修改过的Android query, poi, libvlc库,稍后我会写一下我这次项目的一些可以记录下来的地方。 转载于:https://my.oschina.net/gal/blog/200179 来源: https://blog.csdn.net/chenlian2409/article/details/100790374

Ubuntu Rhythmbox中文乱码解决

瘦欲@ 提交于 2019-11-29 08:05:24
Rhythmbox Music Player是ubuntu自带的一款音乐播放器,功能还算比较强大,使用也简单。唯一的缺点就是中文显示乱码,原因是由于编码不同所致。 在这里介绍一个解决方法,修改变量。 在终端输入: vi ~/.profile 在最后加入下面内容: export GST_ID3_TAG_ENCODING=GBK:UTF-8:GB18030 export GST_ID3V2_TAG_ENCODING=GBK:UTF-8:GB18030 保存退出。 source ~.profile 重启Rhythmbox把歌曲重新导入即可显示正确。此方法在Ubuntu 10.04可行,其他版本应该问题也不大。 来源: oschina 链接: https://my.oschina.net/u/134883/blog/61494

python爬取腾讯视频、爱奇艺vip电影

泄露秘密 提交于 2019-11-29 06:42:24
以chrome为例 首先打开开发者工具 把页面下拉一下,会出现一些新的文件,在network中可以很容易的发现我们需要找的一个XHR文件 这个Request URL就是我们需要找的url,下面还有pageNum这个参数即说明是第几页的数据,我们在发送请求时也要带上 可以发现爱奇艺电影片库里一共有19页,就可以求得每一页的数据: headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36', 'Origin': 'https://list.iqiyi.com' } for page in range(1,20): url = 'https://pcw-api.iqiyi.com/search/video/videolists?access_play_control_platform=14&channel_id=1&data_type=1&from=pcw_list&is_album_finished=&is_purchase=&key=&market_release_date_level=&mode=11&pageNum={}&pageSize=48&site

【mud】坐在车里玩mud(/obj/toy/car.c)

扶醉桌前 提交于 2019-11-29 06:27:55
坐在车里看mud真的很酷, 代码: // by snowcat 5/3/1997 #include <ansi.h> inherit ITEM; mapping chinese_dirs = ([ "north": "北", "south": "南", "east": "东", "west": "西", "northup": "北边", "southup": "南边", "eastup": "东边", "westup": "西边", "northdown": "北边", "southdown": "南边", "eastdown": "东边", "westdown": "西边", "northeast": "东北", "northwest": "西北", "southeast": "东南", "southwest": "西南", ]); mapping left_dirs = ([ "north": "northwest", "south": "southeast", "east": "northeast", "west": "southwest", "northeast": "north", "northwest": "west", "southeast": "east", "southwest": "south", ]); mapping right_dirs = ([

多线程情况下获取数据出现的不一致

丶灬走出姿态 提交于 2019-11-29 05:04:14
前提:要在游戏业务中新建游戏业务日志,用于后台和运营查询数据。 在Service层,找到相应的业务方法,这里举例:reward(Player player,HttpReqest req), 要在reward方法中,new rewardLogData(),同时把业务中的moneyDIff传输给LogData中。 在这里我们使用了Lambda表达式来表示线程执行方法的过程。 ModuleHandler.addMessage()指的是另一条线程执行代码。 reward方法代码大概如下: 1.新旧数据都在ModuleHandler.addMessage()方法中 public rewardService (Player player ,HttpReqest req) { ConfigReward reward = req.getReward(); //业务的逻辑变化 ModuleHandler.addMessage(()->{     int oldMoney = reward.getMoney(); changeMoney(player);int newMoney=reward.getMoney();int moneyDiff = newMoney-oldMoney;   new LogData(player,moneyDiff).post();   }); } private void

pygame

徘徊边缘 提交于 2019-11-28 19:55:34
关于pygame PyGame是SDL库的Python包装器。SDL是一个跨平台库,用于访问计算机多媒体硬件组件(声音,视频,输入等)。SDL是一个非常强大的工具,用于构建各种各样的东西,但它是用C语言编写的,C很难,所以我们使用PyGame。 github网址: https://github.com/pygame/pygame 安装 pip install pygame C:\Users\huang>pip install pygame Collecting pygame Downloading https://files.pythonhosted.org/packages/ed/56/b63ab3724acff69f4080e54c4bc5f55d1fbdeeb19b92b70acf45e88a5908/pygame-1.9.6-cp37-cp37m-win_amd64.whl (4.3MB) 100% |████████████████████████████████| 4.3MB 55kB/s Installing collected packages: pygame Successfully installed pygame-1.9.6 基础对象 屏幕对象 首先,我们需要一张画布,我们称之为“屏幕”,它是我们绘画的平台。为了创建一个屏幕,我们需要调用 pygame