1、ValidationRule 验证ValidationRule:是通过ValidationRule中的的Validate方法来验证我们绑定的属性。所以我们的用法是继承ValidationRule,重写他的Validate方法。示例public class RequiredRule : Valid...
/**Copyright2006SunMicrosystems,Inc.AllRightsReserved.**Redistributionanduseinsourceandbinaryforms,withorwithout*modification,arepermittedprovidedthatthefollowingconditions*aremet:**-Redistributionsofsourcecodemustretaintheabovecopyright*notice,thislistofco..
分类:
其他好文 时间:
2014-10-31 15:58:08
阅读次数:
386
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2014-10-31 15:06:20
阅读次数:
260
这节主要讲的是文本编程 1 // CTextView 绘制 2 3 void CTextView::OnDraw(CDC* pDC) 4 { 5 CTextDoc* pDoc = GetDocument(); 6 ASSERT_VALID(pDoc); 7 if (!pDo...
分类:
编程语言 时间:
2014-10-31 13:42:14
阅读次数:
252
题目链接:poj 2408 Anagram Groups
题目大意:给定若干个字符串,将其分组,按照组成元素相同为一组,输出数量最多的前5组,每组按照字典序输出所
有字符串。数量相同的输出字典序较小的一组。
解题思路:将所有的字符串统计字符后hash,排序之后确定每组的个数并且确定一组中字典序最小的字符串。根据个数
以及字符串对组进行排序。
#include
#incl...
分类:
其他好文 时间:
2014-10-30 23:59:45
阅读次数:
448
问题描述:
Determine if a Sudoku is valid, according to:
Sudoku Puzzles - The Rules.
The Sudoku board could be partially filled, where empty cells are filled with the character
'.'.
A partially...
分类:
其他好文 时间:
2014-10-30 09:35:00
阅读次数:
148
写了一个丑陋无比的解决方法,虽然知道怎么能够在让代码精简些,但是今晚太累人,改天再改。public class Solution { public boolean isValid(String s) { if(s.length()%2==1){ return...
分类:
其他好文 时间:
2014-10-30 00:01:21
阅读次数:
389
这道题考查对二维数组的处理,哈希表。
1.最自然的方法就是分别看每个数是否符合三个规则,所以就需要相应的数据结构来
记录这些信息,判定是否存在,显然最先想到用哈希表。
2.学会把问题抽象成一个个的子问题。
3.在索引的构建上下工夫。
4.底层数组如何对应的细节没有那么重要,重要的是构成了问题的全集。
代码:
附图:一趟遍历时根据i,j,对应到具体的grid,这里的构造模式有多种(??...
分类:
其他好文 时间:
2014-10-29 22:20:29
阅读次数:
212
Valid NumberValidate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intend...
分类:
其他好文 时间:
2014-10-29 21:04:03
阅读次数:
166
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:
其他好文 时间:
2014-10-29 12:44:21
阅读次数:
171