ICode9

精准搜索请尝试: 精确搜索
  • FAIL : Keyword 'BuiltIn.Log' expected 1 to 6 arguments, got 12(解决方法)2020-05-09 13:52:01

    RF运行关键字:Run Keyword If ,log输出报错“FAIL : Keyword 'BuiltIn.Log' expected 1 to 6 arguments, got 12.” 如下图:   解决方法:ELSE IF/ELSE是小写的,只有大写,才能识别。  

  • 解决 VSCode 编辑 vue 项目报错 Expected indentation of 2 spaces but found 42020-05-03 12:03:29

    解决 VSCode 编辑 vue 项目报错 Expected indentation of 2 spaces but found 4解决 VSCode 编辑 vue 项目报错 Expected indentation of 2 spaces but found 4问题问题分析解决办法一解决办法二 解决 VSCode 编辑 vue 项目报错 Expected indentation of 2 spaces but found

  • Parsing error: Expression expected.2020-04-30 12:02:44

    项目中 eslint 报此错误,网上没找到解决方法,自己摸索一番已解决。 // 省略无用代码... hammer.on('doubletap', e => { const c = this.rawCenter(e) this.zoomAround(2, c.x, c.y) }) 编辑器在 const 处提示报错, 将花括号里的代码提取到单独的函数中,再引

  • CF453A Little Pony and Expected Maximum2020-04-13 11:00:21

    \(\large{题目链接}\) \(\\\) \(\Large\textbf{Solution: } \large{设取n次的得到的最大值为M,那么方案数为M^{n}-(M-1)^{n}。\\其中,M^n表示取值在\left[ 1.M\right]的方案数,M^{n - 1}表示取值在\left[ 1,M-1\right]的方案数。\\答案即为:\sum \limits^{m}_{i=1}i\cdot \dfrac {\lef

  • 1042:Gone Fishing(贪心算法)2020-03-28 13:01:33

      查看 提交 统计 提示 提问 总时间限制: 2000ms 内存限制: 65536kB描述John is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachable along a single, one-way road. John starts at

  • fill()2020-03-24 18:04:35

    fill() 方法用一个固定值填充一个数组中从起始索引到终止索引内的全部元素。不包括终止索引。 const array1 = [1, 2, 3, 4]; // fill with 0 from position 2 until position 4 console.log(array1.fill(0, 2, 4));// expected output: [1, 2, 0, 0] // fill with 5 from pos

  • git commit提交时报错husky > pre-commit (node v10.16.0) Stashing changes... [started] Stashing changes.2020-03-17 10:51:40

    项目中使用了husky, 这个会在你git commit的时候先执行里面的严谨模式, 对代码进行检查,  有error就会终止提交  一直想怎么关闭vue里的严谨模式, 后面问到后台有说可以忽略的,问题和方法如下:   git 提交的时候各种提示 $ git commit -m "提交页面" husky > pre-commit (no

  • Codeforces - Little Pony and Expected Maximum2020-03-13 22:36:07

    题目链接:Codeforces - Little Pony and Expected Maximum 假设最大值为 k ,那么期望是多少呢? k * (k ^ n - (k-1) ^ n) / m ^ n 就是可能是方案数 / 总方案数 * k AC代码: #pragma GCC optimize("-Ofast","-funroll-all-loops") #include<bits/stdc++.h> //#define int lo

  • 数组map,filter,forEach的区别2020-03-07 20:01:53

    今天自己练手的时候,分析了下这三个方法的用法。 一. map 它是由原数组每一项调用一个函数之后,返回一个新的数组 。 const array1 = [1, 4, 9, 16]; // pass a function to map const map1 = array1.map(x => x * 2); console.log(map1); // expected output: Array [2, 8,

  • C++ - expected identifier before numeric constant2020-03-04 10:05:11

    C++ - expected identifier before numeric constant 1. Build log -------------- Build: Debug in Bubble (compiler: GNU GCC Compiler)--------------- g++ -Wall -std=c++11 -fexceptions -rdynamic -DUSE_OPENCV -g -std=c++11 -I/usr/local/include/opencv4 -Irapid

  • IndentationError: expected an indented block2020-02-27 18:51:31

    Python使用for循环遍历列表 代码:  fruits=['apple','pear','grape','mango','lemon'] for fruit in fruits : print(fruit) 错误: IndentationError: expected an indented block #期望一个缩进的块 原因:   在c语言和Java中都是用花括号{ }来区分一个块的,而在p

  • 正则只能输入数字与正数带两位小数2020-02-19 17:40:56

    function num(obj){ obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和".“以外的字符 obj.value = obj.value.replace(/^0/g, “”);//(/^./g,”"); //验证第一个字符是数字 obj.value = obj.value.replace(/.{2,}/g,"."); //只保留第一个, 清除多余的 obj

  • selenium.webdriver expected_conditions方法说明2020-02-19 14:53:23

    expected_conditions提供的预期条件判断方法 方法 说明 title_is 判断当前页面的标题是否等于预期 title_contains 判断当前页面的标题是否包含预期字符串 presence_of_element_located 判断元素是否被加在DOM树里,并不代表该元素一定可减 visibility_of_element_loca

  • python3基础篇06(异常处理2-断言)2020-02-02 21:39:27

    断言 # 断言 # 实际结果 res = "888" # 预期结果 expected = "888" if res == expected: print("通过") else: print("不通过") 结果:   断言  assert  表达式   # 断言 assert 表达式 # 断言:比较两个数据是否一致 try: print(aaa) assert res == ex

  • win运行celery的,解决ValueError: not enough values to unpack (expected 3, got 0)2020-01-29 18:44:21

    1.在window上celery4.0以上不支持windows,如果要支持需要手动安卓eventlet celery worker -A celery_app_task -l info -P eventlet 2.运行时发现还是不能提交任务 所以需要再后面增加一个 -E 用来启动 完整命令: celery worker -A celery_app_task -l info -P eventlet -E

  • 单元测试-测试类-test_api2020-01-22 21:57:36

    import unittest from API_AUTO.tools.http_request import HttpRequest class TestLogin(unittest.TestCase): def setUp(self): print("开始执行测试用例") def tearDown(self): print("用例执行完毕") def __init__(self, methodNam

  • python中unittest单元测试框架的简单应用-demo2020-01-02 09:01:22

    import unittest class TestSetUp(unittest.TestCase): # 前置条件当中 # 每一个测试用例方法执行之前都会运行的代码 # 可以把测试数据放到 setUp 当中 def setUp(self): print("正在执行测试准备") self.a = 10 self.b = 20 de

  • pytest 参数化2019-12-28 10:57:25

    pytest文档9-参数化parametrize   前言 pytest.mark.parametrize装饰器可以实现测试用例参数化。 parametrizing 1.这里是一个实现检查一定的输入和期望输出测试功能的典型例子 # content of test_expectation.py# coding:utf-8import pytest@pytest.mark.parametrize("test_in

  • python selenium expected_conditions 模块解析2019-12-07 17:56:41

        #coding=utf-8from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support import expected_conditions as ECfrom selenium.webdriver.support.wait import WebDriverWait base_url = "http://www.baidu.com"

  • 11、pytest -- 测试的参数化2019-11-13 13:50:56

    目录 1. @pytest.mark.parametrize标记 1.1. empty_parameter_set_mark选项 1.2. 多个标记组合 1.3. 标记测试模块 2. pytest_generate_tests钩子方法 往期索引:https://www.cnblogs.com/luizyao/p/11771740.html 在实际工作中,测试用例可能需要支持多种场景,我们可以把和场

  • odoo self.ensure_one()2019-10-02 09:52:57

    源码: def ensure_one(self): """ Verifies that the current recorset holds a single record. Raises an exception otherwise. """ try: # unpack to ensure there is only one value is faster than len when true and

  • do{...} while(0)2019-09-13 11:03:14

    前段时间看公司项目源码时,发现一个很有意思的地方,就是在很多宏函数定义里会出现do{...} while(0)。 #define ASSERT_ARRAY_EQ(expect, actual) do { / ASSERT_EQ(sizeof(expect), sizeof(actual)); / for( size_t i = 0; i < sizeof(expect)/sizeof(int); i++)

  • Json文件出现Expected value at 1:0问题的解决办法2019-08-28 11:35:50

    问题描述: 如要消除红叉,关闭Json Validation即可,如下操作: Window > Preferences >  搜索Validation > 右侧将“JSON Validator”关闭即可。如下图:

  • cf 1174 D Ehab and the Expected XOR Problem2019-08-24 23:01:50

    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和x,那么a之间也不会。 #include <cstdio> #include <cstr

  • 如何开始TDD2019-07-20 11:42:30

    原文链接:http://www.cnblogs.com/wangyh/archive/2009/04/25/how-to-begin-TDD.html TDD已经被证实为一项可以提高软件质量的基本实践,然而对于很多程序员来说,在抱着尝试一下的想法实践的时候,却困难重重。这里面有多方面的因素,比如环境,比如编程习惯,比如不

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有