自己编写了一个表单验证插件,使用起来很简单,以后还可以扩展更多的功能,比如ajax验证。 思路借鉴了wojilu框架。每个需要验证的表单元素下面有一个span标签,这个标签的class有一个valid表示需要验证,如果有nullable则表示可为空;rule表示验证规则,msg表示错误提示信息...
分类:
其他好文 时间:
2014-12-23 00:10:05
阅读次数:
224
segment 3android 小游戏 ---- 数独(三)好的,既然要把数独棋盘中初始提示数字绘制出来,我们就要先了解数独的一些特点。数独棋盘中总共是81个数字,那我们是否可以用一个数组来代表整个棋盘对应的数字呢想象我们初始化一个9x9的数组,private int[] sudoku = new...
分类:
移动开发 时间:
2014-12-22 14:19:50
阅读次数:
217
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be o...
分类:
其他好文 时间:
2014-12-22 08:15:16
阅读次数:
202
Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre...
分类:
其他好文 时间:
2014-12-21 21:55:07
阅读次数:
230
这个题目我采用了两种方案,第一种方案代码行数相对较少,但效率稍低,第二种方案参照网上的进行改进代码行数相对多些,但效率稍高。
题目:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
The brack...
分类:
其他好文 时间:
2014-12-21 20:43:27
阅读次数:
202
Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must clos...
分类:
其他好文 时间:
2014-12-20 12:50:17
阅读次数:
163
如需转载请标明出处:http://blog.csdn.net/itas109
今天写正则表达式的时候出现下图错误
解决:
java转义的问题,把\替换成\\即可
如需转载请标明出处:http://blog.csdn.net/itas109...
分类:
其他好文 时间:
2014-12-19 19:10:48
阅读次数:
198
【题目】
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
For example:
Given "25525511135",
return ["255.255.11.135", "255.255.111.35"...
分类:
其他好文 时间:
2014-12-19 17:26:18
阅读次数:
117
临时UPDATE/DELETE数据,尽量按照下面步骤执行。1、备份。selectinto到backup_tables库中。2、显示开启事务3、限制行数:TOP(N)4、执行更新,并检查结果5、回滚事务/提交事务--UPDATE示例SELECTcompliant_id,is_valid_complia...
分类:
其他好文 时间:
2014-12-18 16:56:13
阅读次数:
218
Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substr...
分类:
其他好文 时间:
2014-12-18 11:48:19
阅读次数:
158