一、在SringMVC中使用 使用注解 1、准备校验时使用的JAR validation-api-1.0.0.GA.jar:JDK的接口; hibernate-validator-4.2.0.Final.jar是对上述接口的实现; log4j、slf4j、slf4j-log4j 2、编写需要校验的b ...
分类:
Web程序 时间:
2017-08-08 10:55:15
阅读次数:
211
题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or anoth ...
分类:
其他好文 时间:
2017-08-07 00:18:22
阅读次数:
134
Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return true. s = "rat", t ...
分类:
其他好文 时间:
2017-08-05 12:40:44
阅读次数:
121
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such p ...
分类:
其他好文 时间:
2017-08-02 17:42:48
阅读次数:
119
默认情况下,你的VS2012工程发布后,在XP下运行会出现提示“not a valid win32 application”。 微软推出了Visual Studio 2012 update 1可以支持发布到XP平台,这个更新好像只能在线安装,比较麻烦. 然而就算你打了补丁,你的程序在XP下可能还会出 ...
分类:
其他好文 时间:
2017-07-28 23:49:30
阅读次数:
180
1、pom.xml中追加hibernate-validator 2、在dto类的域上追加JSR-303的注解 3、在入参控制器的dto参数前追加@Valid,并追加BindingResult对象 有一个特殊情况, 比如dto里面有个Integer no的域, 前端非法地发送了data: {'no': ...
分类:
编程语言 时间:
2017-07-28 17:36:44
阅读次数:
273
题目: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ B ...
分类:
其他好文 时间:
2017-07-25 21:05:37
阅读次数:
180
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan ...
分类:
其他好文 时间:
2017-07-24 19:08:19
阅读次数:
111
LeetCode解题之Valid Parentheses 原题 推断一个仅仅包括各种括号符号的字符串中括号的匹配情况。 注意点: 字符串中仅仅会包括”(“,”)”,”[“,”]”,”{“,”}”这些字符 括号匹配要注意顺序,字符串”([)]”是错误的匹配 样例: 输入: s=”(){}” 输出: T ...
分类:
其他好文 时间:
2017-07-23 22:45:00
阅读次数:
205
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only ...
分类:
其他好文 时间:
2017-07-22 22:29:55
阅读次数:
132