common

hdu1423――Greatest Common Increasing Subsequence

匿名 (未验证) 提交于 2019-12-03 00:29:01
This is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. Input Each sequence is described with M - its length (1 <= M <= 500) and M integer numbers Ai (-2^31 <= Ai < 2^31) - the sequence itself. Output output print L - the length of the greatest common increasing subsequence of both sequences. Sample Input 1 5 1 4 2 5 -12 4 -12 1 2 4 Sample Output 2 学了新的模板LICS 最大公共递增子序列 领悟了一天才大概懂了 妈蛋 代码: #include <cstdio> #include <algorithm> #include <cstring> using namespace std ; const int MAXN = 550 ; int a [ MAXN ]; int b [ MAXN ]; int t ; int al ; int bl ; int

Could not find common.jar (android.arch.core:common:1.0.0)/Failed to resolve :common解决办法

匿名 (未验证) 提交于 2019-12-03 00:26:01
这些天,在家里重新安装Android Studio的时候,遇到一个问题 Failed to resolve :common 有些人也有可能是这样 Could not find common.jar (android.arch.core:common:1.0.0) 但是其实他们都是一个问题,这是谷歌近期大面积出现的一个问题。 通过在网上搜索,一般的解决方案有两种 1.把build.gradle中所有的 compile 'com.android.support:appcompat-v7:26.+' 都改成 compile 'com.android.support:appcompat-v7:26.0.0' 也就是不要所有".+"这种形式的compile 不过这种方式对我无效 2.把项目的build.gradle中allprojects{}中加上 maven{url"https://maven.google.com"} 不过对我来说还是没用 因为我用的as3.1.3,已经有google()这个标签了 3.这个是对我唯一有效的方法 就是把google()标签,移动到allprojects中的最上面 这个解决办法虽然可以理解,但是确实很扯 文章来源: Could not find common.jar (android.arch.core:common:1.0.0)/Failed to

cocoapi - error: pycocotools/_mask.c: No such file or directory

匿名 (未验证) 提交于 2019-12-03 00:19:01
cocoapi - error: pycocotools/_mask.c: No such file or directory 1. x86_64-linux-gnu-gcc: error: pycocotools/_mask.c: No such file or directory strong@foreverstrong:~/darknet_model_validation/coco_detection_evaluation/cocoapi/PythonAPI$ make python setup.py build_ext --inplace running build_ext building 'pycocotools._mask' extension creating build creating build/common creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/pycocotools x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack

编译Netty源码遇到的一些问题-缺少io.netty.util.collection包

匿名 (未验证) 提交于 2019-12-03 00:15:02
缺少包和java类 下载好Netty的源码后,导入到IDE,运行自带的example时编译不通过。 如下图,是因为io.netty.util.collection的包没有 点进去看,确实没有这个包 发现猫腻 发现这个common包下有一个templates包,放的应该是模板。还有一个script包,放的应该是脚本。 知道了这个原理,那怎么运行这个脚本的呢? 我们看他是groovy结尾的,应该是需要groovy的一个插件,pom文件里也确实有这个插件 怎么用这个插件运行脚本呢? 选中这个common项目右键选择Run Maven - compile 运行失败 不好意思,报了一堆错,错误信息缺失一片空白 打开对应的java文件,也是没有任何错误提示的,难搞。。。 解决运行失败 别急,慢慢看。把错误拉到最后看 粘出来错误信息: E:\idea_work\netty-4.1\common\src\main\resources\META-INF\native-image\io.netty\common\native-image.properties:0: invalid newline character (expected: CRLF) [Newline] E:\idea_work\netty-4.1\common\src\main\resources\META-INF\native

selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable报错

匿名 (未验证) 提交于 2019-12-03 00:09:02
selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable 页面元素不可交互 调试发现其实是 self.driver.find_element_by_xpath("//li[text()='新闻']")找到了多个元素 重新定位一下保证找到的值是唯一的就ok 来源:博客园 作者: 无籽西瓜酱 链接:https://www.cnblogs.com/wenm1128/p/11543643.html

LeetCode 1143. Longest Common Subsequence

匿名 (未验证) 提交于 2019-12-02 23:57:01
原题链接在这里: https://leetcode.com/problems/longest-common-subsequence/ 题目: Given two strings text1 and text2 , return the length of their longest common subsequence. A subsequence of a string is a new string generated from the original string with some characters(can be none) deleted without changing the relative order of the remaining characters. (eg, "ace" is a subsequence of "abcde" while "aec" is not). A common subsequence of two strings is a subsequence that is common to both strings. If there is no common subsequence, return 0. Example 1: Input : text1 = "abcde" , text2 = "ace" Output : 3

CF1203C Common Divisors

谁说胖子不能爱 提交于 2019-12-02 23:43:46
You are given an array a a consisting of n n integers. Your task is to say the number of such positive integers x x such that x x divides eachnumber from the array. In other words, you have to find the number of common divisors of all elements in the array. For example, if the array a a will be [ 2 , 4 , 6 , 2 , 10 ] [2,4,6,2,10], then 1 1 and 2 2 divide each number from the array (so the answer for this test is 2 2). Input The first line of the input contains one integer n n ( 1 ≤ n ≤ 4 ⋅ 10 5 1≤n≤4⋅105) — the number of elements in a a. The second line of the input contains n n integers a 1 ,

. selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary

匿名 (未验证) 提交于 2019-12-02 23:40:02
使用Chrome浏览器时,经常会遇到以下报错:浏览器没有调用起来 selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary 通常由两种问题引起的: 1.ChromeDriver.exe驱动有问题(包括版本,路径等等) 2.Chrome.exe本身有问题。 解决方案:三个 1.指定chromedriver.exe驱动绝对路径 driver = webdriver.Chrome(r'd:\xxx\chromedriver.exe') 2.添加chrome.exe到系统path环境变量 3.在代码中指定chrome.exe绝对路径。设置binary_location属性 option = webdriver.ChromeOptions() option.binary_location=r'C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe' driver = webdriver.Chrome() driver.get('https://www.baidu.com') 注:解决方案1在遇到问题:selenium.common.exceptions

Vue-全局变量和方法

匿名 (未验证) 提交于 2019-12-02 23:40:02
一、单文件引入 1、创建存放全局变量和方法的vue文件   Common.uve <script> const userName = 'yangjing' ; function add ( a , b ) { return a + b } export default { userName , add } </script> 2、在需要使用的组件(A组件和B组件)中引入Common.uve <template> <div> <h2 @ click = "changeName" > {{name}} </h2> <h2 @ click = "add" > 3+6 = {{num}} </h2> </div> </template> <script> import Common from '@/components/Common' export default { name : "Details" , data () { return { name : Common . userName , num : '' } }, methods : { add () { this . num = Common . add ( 3 , 6 ) } } } </script> 在A组件中修改全局变量userName时在B组件中可以看到userName是更新了的 二、全局引入

selenium 异常

匿名 (未验证) 提交于 2019-12-02 23:34:01
Exceptions(异常) Python 自带的异常,所有异常的基类。 异常:  selenium.common.exceptions.ElementNotSelectableException(msg=None, screen=None, stacktrace=None)       服务器端有错误时,异常将抛出(这个原因可能是因为Firefox插件或者远程server) 异常:   selenium.common.exceptions.InvalidCookieDomainException(msg=None, screen=None, stacktrace=None) 异常:   selenium.common.exceptions.InvalidElementStateException(msg=None, screen=None, stacktrace=None) 异常:   selenium.common.exceptions.MoveTargetOutOfBoundsException(msg=None, screen=None, stacktrace=None) 异常:   selenium.common.exceptions.NoAlertPresentException(msg=None, screen=None, stacktrace=None)