event

2019 ICPC银川区域赛 Girls Band Party(分组背包)

时光毁灭记忆、已成空白 提交于 2020-03-05 01:25:02
You are currently playing a game called “Garupa”. In an event of the game, you are trying to get more event points. You have nn cards, each with its own name, color, and power. When you play the game, you can put five cards of different names into your deck. The base point of this event is the sum of the power of the cards in your deck. On top of that, the event publishes a color and five names as bonus attributes, which means that each time you have a card with a bonus color in the deck, you end up with a 20%20% increase in event point. And each time you have a card with a bonus name in the

VUE实现Studio管理后台(一):鼠标拖放改变窗口大小

我与影子孤独终老i 提交于 2020-03-04 15:41:59
近期改版RXEditor,把改版过程,用到的技术点,记录下来。昨天完成了静态页面的制作,制作过程并未详细记录,后期已经不愿再补了,有些遗憾。不过工作成果完整保留在github上,地址: https://github.com/vularsoft/studio-ui 这个项目下面的html-demo.html,便是静态文件。 话不多说,今天就把昨天的HTML转化成VUE。 先看效果: 布局原理 页面采用纯弹性盒子flex box布局,无float postion等,页面分成如下几个区域: 细实线描述的是各个DIV之间的嵌套关系,粗黑线是独立的DIV,我称它们为把手(HADLE),主要用来接受鼠标拖动事件,以完成拖动操作。handle非为两种,横向x-handle,纵向y-handle,css中定义x-handle宽度为3px,高度为100%,y-handle高度为3px,宽度为100%,鼠标光标也相应设置一下: .vular-studio .x-handle{ width: 3px; cursor: w-resize; z-index: 10; } .vular-studio .y-handle{ height: 3px; cursor: s-resize; z-index: 10; } 拖动原理 带有把手的区域固定大小(固定宽度或者高度),不带把手的部分跟随弹性盒子变化

微信的事件消息

烂漫一生 提交于 2020-03-04 15:27:33
1、关注 1.1、按钮类型的取消关注 <xml> <ToUserName><![CDATA[toUser]]></ToUserName> <FromUserName><![CDATA[FromUser]]></FromUserName> <CreateTime>123456789</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[subscribe]]></Event> </xml> 1.2、扫码 1.2.1、未关注,扫码关注 <xml><ToUserName><![CDATA[toUser]]></ToUserName> <FromUserName><![CDATA[FromUser]]></FromUserName> <CreateTime>123456789</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[subscribe]]></Event> <EventKey><![CDATA[qrscene_123123]]></EventKey> <Ticket><![CDATA[TICKET]]></Ticket> </xml> 1.2.2、用户已关注 <xml> <ToUserName><![CDATA

Javascript 键盘事件

放肆的年华 提交于 2020-03-04 13:40:36
window.document.onkeydown = function (e) { var evt = window.event || e;//兼容性处理 var keycode = evt.keyCode; switch (keycode) { case 37://左 pgwSlideshow.previousSlide(); break; case 39://右 pgwSlideshow.nextSlide(); break; } }; Javascript的键盘事件 keyCode 37 为左方向键,38为上,39为右,40为下 相关键值可以参照 http://www.cnblogs.com/hsapphire/archive/2009/12/16/1625642.html -------------------------------------------------分割线----------------------------------------------------- 一下参照 http://www.jb51.net/article/44654.htm 中的部分内容: document.onkeyup =function (e) {      var currKey=0,e=e||event;      currKey=e.keyCode||e.which|

jquery学习

怎甘沉沦 提交于 2020-03-03 11:16:36
title: jquery学习 date: 2019-10-30 原本在个人博客上写了一些博文,现转移到CSDN上 jquery学习 最近手头上在做关于创建要素的一些工作,前台部分涉及多个div的输入区域,每个区域又包含多个input。类似这种 其中涉及到js的各种操作,需要利用jquery来实现多种效果,记录如下: 获取网页要素 在js操作中,需要获取网页中某个div的value,对value中的某些属性进行一些操作。 本例中,我所用的是jquery绑定按钮的id,获取当前的源div的value,并通过源div取数组来获取自己想要的div要素。 $(document).on('click','#addmodel',function ($event) { var e = $event.originalEvent.path[4];//获取当前div的源div,取得modelarr的div的class值 console.log(e.className); } 其中关键就是加上$event获取event值,来取得需要的要素value 使新增的button有效 在点击add之后,会新增一个条目,条目中有button,但是点击这个新增的button出现了无法触发click事件的情况。 原代码: $("#add").click(function () {} 利用这种方式

Table Inheritance with Doctrine

旧街凉风 提交于 2020-03-02 16:18:31
NTRODUCTION Lately we had several projects where we had to store in a database very different items that shared a common state. As an example take the RocketLab website you are reading: Events and BlogPosts are aggregated in the LabLog list as if they were similar items. And indeed they all have a Title, a Date and a Description. But if you get the detail page of an Event or a BlogPost you can see that they actually don’t contain the same information: a BlogPost contains essentially formatted text when an Event contains more structured information such as the place where the event will take

CSSE1001 / 7030 Semester

断了今生、忘了曾经 提交于 2020-03-02 09:43:07
CSSE1001 / 7030 Semester 1, 2019 Assignment 2 (15 Marks) Due: Friday 3 May 2019 at 8:30pm Introduction The second assignment is a simple weather prediction and event planning system. You will provide some information about how the weather could affect an event. The system will predict the weather and indicate if conducting the event is advisable. The purpose of this assignment is to help you to understand how to make use of classes to define an object’s structure. And, to help you understand how to implement program functionality by having several objects interacting with each other, by

python之线程

大憨熊 提交于 2020-03-02 04:01:09
什么是线程? 线程是CPU上的执行单位。 线程和进程的区别 1、进程是资源的集合,是一个资源单位。线程是CPU上是执行单位。所以开进程开销与远大于开线程 2、进程单独开辟内存空间。同一个进程内多线程共享同一个内存空间 a = 100 def task(): global a a = 0 if __name__ == '__main__': # p = Process(target=task, ) # p.start() # p.join() # print(a) # 100 t = Thread(target=task, ) t.start() t.join() print(a) # 0 3、开多个进程,每个进程有不同的pid。在主进程下开启多个线程,每个线程的pid和主进程的pid一样 Thread对象的其他用法 from threading import Thread, current_thread, active_count, enumerate import time def task(): print("子进程", current_thread().getName(), current_thread().name) # current_thread().getName() == current_thread().name time.sleep(2) if __name__

案例——登录界面

北战南征 提交于 2020-03-01 22:53:25
登录小程序介绍 当获取到用户信息时,自动登陆。如果没有获取到用户信息,则跳转到登录界面。 登录小程序实例代码 1.创建一个新工程 2.删除logs文件夹 3.建立login和user界面 4.login.js: loginBtnClick: function () { // 用户名和密码验证的过程 app.appData.userinfo = { username : this. data.username, password : this.data.password } wx.switchTab( { url : "../user/user" } ) } , usernameInput: function (event) { console.log(event) this.setData( { username : event.detail.value } ) } , passwordInput: function (event) { this.setData( { password : event.detail.value } ) } login.wxml <view class= "mcontainer" > <view class= "item" > <image src= "../../images/20.png" class= "image" /> </view>

JavaScript

会有一股神秘感。 提交于 2020-03-01 20:13:19
=== 是全等 表示不仅要值相等,双方类型也要相等才为true == 是相对相等 表示值相等则都为true NaN 是一个数值,是not a number的缩写 不是一个数字的意思,是一个与任何数值都不相等的数字 NaN == NaN 结果是false JavaScript常见的兼容 · 滚动条 document.documentElement.scrollTop||document.body.scrollTop · 网页可视区域兼容 window.innerHeight || document.documentElement.clientHeight window.innerWidth || document.documentElement.clientWidth · 事件对象兼容 e = e || window.event · 阻止事件冒泡兼容 event.stopPropagation event.stopPropagation():event.cancelBubble=true · 阻止默认行为兼容 evt.preventDefault?evt.preventDefault():evt.returnValue=false · 事件监听兼容 addEventListener() attachEvent() · 事件目标对象兼容 event.target || event