题目传送门 题意:小明每晚都玩游戏,每一盘赢的概率都是p,如果第一盘就赢了,那么就去睡觉;否则继续玩,玩到赢的比例大于p才去睡;如果一直玩了n盘还没完成,就第二天再玩,并且游戏记录清空;问他玩游戏天数的期望; 思路:由于每次玩游戏,每天玩游戏都是独立重复试验,所以可以考虑一天玩游戏,玩不到p的概率( ...
分类:
其他好文 时间:
2019-09-03 13:22:26
阅读次数:
69
from selenium import webdriverfrom selenium.webdriver.support.wait import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as E... ...
分类:
其他好文 时间:
2019-09-01 22:04:23
阅读次数:
89
expected_conditions模块提供了判断页面元素的16种方法 1、title_is: 判断当前页面的title是否完全等于(==)预期字符串,返回布尔值2、title_contains : 判断当前页面的title是否包含预期字符串,返回布尔值3、presence_of_element_ ...
分类:
其他好文 时间:
2019-08-30 19:14:54
阅读次数:
71
<!-- 配置文件上传解析器 --><!-- id必须要配置,而且是配置父类接口的类名 --><bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" ...
分类:
编程语言 时间:
2019-08-30 13:59:07
阅读次数:
80
打开pycharm,新建python项目时,提示no python interpreter configured for the project,理解为没有找到解释器 可手动设置添加解释器 1. 点击Configure Python interpreter,进入project interpreter ...
分类:
编程语言 时间:
2019-08-29 09:51:13
阅读次数:
159
Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that t ...
分类:
其他好文 时间:
2019-08-28 00:58:33
阅读次数:
82
Codeigniter Session: Configured save path is not a directory ...
分类:
其他好文 时间:
2019-08-27 19:43:56
阅读次数:
96
cf 1174 D "Ehab and the Expected XOR Problem" 题意 在1~$2^n$范围内找到一个最长的序列,使得该序列的每一个子串异或后不等于0和x 题解 假设该序列为a,那么前缀异或和b[i] = a[i]^a[i 1]^...^a[0],如果b之间异或都不会等于0 ...
分类:
其他好文 时间:
2019-08-25 01:16:55
阅读次数:
107
package com.course.testng.suite; import org.testng.annotations.Test; public class ExpectedExeption { /* 什么时候回应道异常测试????? 在我们期望结果为某一个异常的时候 比如:我们传入不合法的参... ...
分类:
其他好文 时间:
2019-08-24 18:32:57
阅读次数:
76
在安装Kafka集群的时候,碰到这个问题。 我们知道在搭建Kafka集群的时候,我们需要设置broker.id,以作为当前服务器在整个集群的唯一标志。 网上搜查资料是说,log.dirs目录下的meta.properties中配置的broker.id和配置目录下的server.properties中 ...
分类:
Web程序 时间:
2019-08-23 14:58:20
阅读次数:
157