using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
//把Json字符串反序列化为对象
目标对象 = JsonConvert.DeserializeObject(JSON字符串, typeof(目标对象));
//把目标对象序列化为Json字符串
string Json字符串 = JsonConvert.Seriali...
分类:
Web程序 时间:
2015-04-16 19:59:04
阅读次数:
185
单调栈的思想很巧妙,若进入的元素比栈顶小,则栈顶出栈,把相应信息更新一下,直到要进入的元素比栈顶元素大
//注意这道题和Facer’s string这道题的区别
//该题求的是sa[i]-sa[j]的lcp,需要用到的是height[i+1]-height[j]
//而 Facer’s string这道题用到的是height[i]-height[j]的值,涉及到的是sa[i-1]-sa[j]
...
分类:
其他好文 时间:
2015-04-16 19:57:25
阅读次数:
136
/**
* 将Clob对象转换成String对象
* @param clob
* @return
* @throws SQLException
* @throws IOException
*/
public static String ClobToString(Clob clob) throws SQLException, IOException{
String st...
分类:
其他好文 时间:
2015-04-16 19:55:03
阅读次数:
132
格式说明符的语法对齐说明符 正数表示右对齐,负数表示左对齐。如果要表示的字符数比对齐说明符中指定的数少,会用空格填充;如果多了,就会被忽略掉。1 static void Main(string[] args)2 {3 var temp = 1...
分类:
其他好文 时间:
2015-04-16 19:43:51
阅读次数:
154
命名空间:using System.Collections;class Program {//做个比较 static void Main(string[] args) { //new对象 Cls a1 = new Cls(...
String 字符串常量StringBuffer 字符串变量(线程安全)StringBuilder 字符串变量(非线程安全)简要的说, String 类型和 StringBuffer 类型的主要性能区别其实在于 String 是不可变的对象, 因此在每次对 String 类型进行改变的时候其实都等同...
分类:
其他好文 时间:
2015-04-16 19:35:10
阅读次数:
132
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...
分类:
其他好文 时间:
2015-04-16 19:33:20
阅读次数:
110
转自:http://www.diybl.com/course/3_program/java/javajs/2007104/75886.html 字符串可能是任何程序语言中都会出现的对象,java中创建并初始化一个String对象,最常见的方式有两种:String str=new String("XX...
分类:
编程语言 时间:
2015-04-16 19:32:52
阅读次数:
167
public static int emailduan(string x)//类里边,函数名随便起,需要传入参数为string类型 { string[] a = x.Split('@');//以@为分界线,分为数组 int a1 = a.Length; if (a1 == 2) { string[]...
1 题目Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter...
分类:
其他好文 时间:
2015-04-16 19:19:32
阅读次数:
100