题目描述:括号(小括号、中括号、大括号)的匹配 传送门:https://leetcode-cn.com/problems/valid-parentheses/ 解法:《数据结构》中作为例子引出栈的概念。用一个栈维护,从左到右扫描目标字符串,如果括号匹配,即满足三种情况: ①、s[i] == ')' ...
分类:
其他好文 时间:
2020-01-13 20:19:49
阅读次数:
95
@Valid是使用hibernate validation的时候使用 @Validated 是只用spring Validator 校验机制使用 基于方法参数的校验对基本类型的校验 例如:以下服务触发第一个参数的验证,确保其大小在8到10之间: @Service@Validatedpublic cl ...
分类:
编程语言 时间:
2020-01-13 12:39:12
阅读次数:
96
前言: 在用IE浏览器时访问tomcat项目时,页面报400错误,后台错误: 在网上查得资料时因为Tomcat版本在7以后会对http请求进行验证 解决办法: 1.使用encodeURI函数,因为IE浏览器无法对URL自动转义 2.JS使用post请求 ...
分类:
其他好文 时间:
2020-01-09 18:37:45
阅读次数:
64
默认校检规则 (1)、required:true 必输字段 (2)、remote:"remote-valid.jsp" 使用ajax方法调用remote-valid.jsp验证输入值 (3)、email:true 必须输入正确格式的电子邮件 (4)、url:true 必须输入正确格式的网址 (5)、 ...
分类:
Web程序 时间:
2020-01-09 10:27:30
阅读次数:
303
Another exception was thrown: RangeError (index): Invalid value: Valid value range is empty: -1 flutter 项目中报这个错 排除编译错误 打包grade 报错 的情况下 很可能就是这种情况 不管后面的 ...
分类:
其他好文 时间:
2020-01-01 15:04:14
阅读次数:
122
A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strings, and +represents string concaten ...
分类:
其他好文 时间:
2019-12-31 14:44:42
阅读次数:
90
1. 题目链接 "传送门" 2. 题意 数独游戏大家都有玩过, 本题给出一个9 9数独棋盘, 你需要给出一个合法的终局棋盘 3. 解题思路 对每一个位置dfs搜索可行解, 81层dfs不会爆栈, 安心dfs就好, 搜索方式见代码 4. AC代码 Java class Solution { publi ...
分类:
其他好文 时间:
2019-12-30 21:07:15
阅读次数:
76
@Valid: @Valid注解用于校验,所属包为:javax.validation.Valid。 ① 首先需要在实体类的相应字段上添加用于充当校验条件的注解,如:@Min,如下代码(age属于Girl类中的属性): @Min(value = 18,message = "未成年禁止入内") priv ...
分类:
其他好文 时间:
2019-12-27 20:29:30
阅读次数:
124
原题链接在这里:https://leetcode.com/problems/rotated-digits/ 题目: X is a good number if after rotating each digit individually by 180 degrees, we get a valid ...
分类:
其他好文 时间:
2019-12-27 09:49:53
阅读次数:
54
开发中遇见了 vue.runtime.esm.js:1888 DOMException: Failed to execute 'setAttribute' on 'Element': ')' is not a valid attribute name. at baseSetAttr (http:// ...
分类:
其他好文 时间:
2019-12-26 12:58:38
阅读次数:
122