最近在做输入判断的时候出现了一个需要判断输入合法性的问题,就是判断输入的是不是数字,判断方法是根据正则表达式来判断,具体方法如下: private bool IsRightNum(string str, int totalPage) { Regex reg = n...
.NET是微软提供的一个开发平台。.NET与其他的技术不同,它的编译原理是:不同的语言,有不同的编译器,编译为中间代码,用exe文件保存在硬盘里(注意保存的是中间代码),在运行时,编译成最终代码。它与我们写网页有很大区别:虽然用法相同,但是有些类型不同,比如string就相当于char类型,在.NE...
分类:
Web程序 时间:
2015-03-29 19:20:15
阅读次数:
111
题目:leetcode
Longest Substring Without Repeating Characters
Given
a string, find the length of the longest substring without repeating characters. For example, the longest substring without repea...
分类:
编程语言 时间:
2015-03-29 18:08:07
阅读次数:
152
stringstream 特定的操作
stringstream strm; // 创建自由的 stringstream 对象
stringstream strm(s); //创建存储 s 的副本的 stringstream 对象,其中 s 是 string 类型的对象
strm.str() //返回 strm 中存储的 string 类型对象
strm.str(s) //将 strin...
分类:
其他好文 时间:
2015-03-29 18:05:14
阅读次数:
127
Java,String,StringBuffer,StringBuilder
分类:
编程语言 时间:
2015-03-29 18:02:52
阅读次数:
148
1.题目要求Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lett...
分类:
其他好文 时间:
2015-03-29 17:51:03
阅读次数:
123
先不多说,直接上个例子,著名的生产者消费者问题。 1 public class ProducerConsumer { 2 public static void main(String[] args) { 3 SyncStack ss = new SyncStack(); 4...
分类:
编程语言 时间:
2015-03-29 17:50:53
阅读次数:
162
Java反射机制主要提供了以下功能: 在运行时判断任意一个对象所属的类;在运行时构造任意一个类的对象;在运行时判断任意一个类所具有的成员变量和方法;在运行时调用任意一个对象的方法。public class JavaTest { public static void main(String[] ...
分类:
编程语言 时间:
2015-03-29 17:45:52
阅读次数:
139
题目:
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating, enclose the repeating part in parentheses.For...
分类:
其他好文 时间:
2015-03-29 16:36:10
阅读次数:
144