插件模块与模块之间的通信在这里做个代码备注 防止下次忘记。。。using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Reflection;using System.Wi...
分类:
其他好文 时间:
2014-09-16 10:35:50
阅读次数:
144
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-09-16 00:15:49
阅读次数:
196
${wjcd.lrsj}原来得到的是如2006-11-12 11:22:22.0${fn:substring(wjcd.lrsj, 0, 16)}使用functions函数来获取list的长度${fn:length(list)} fn:contains(string, substring) ...
分类:
其他好文 时间:
2014-09-15 22:34:29
阅读次数:
317
最长公共子串(Longest Common Substring)是一个非常经典的问题,它的基本描述为“给定两个字符串,求出它们之间最长的相同子字符串(要求连续)的长度”。求N个最长为L的字符串的的LCS的方法大致可分为以下几类:1.枚举法显然是简单但极端低效的算法,改进一些的算法是用一个串的每个后缀对其他所有串进行部分匹配,用KMP算法,时间复杂度为O(NL2)。2.动态规划解法:平方的时间算法。3.后缀数组与高度数组解法,利用二分查找技术,时间复杂度为O(NLlogL)。3.广义后缀树方法,时间复杂度为可...
分类:
其他好文 时间:
2014-09-15 21:22:49
阅读次数:
389
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:
其他好文 时间:
2014-09-15 14:22:39
阅读次数:
222
有时候一个文件格式正确在某些情况下不一定能够正确播放,下面可以借助于java的一个类帮助我们把文件格式转正确
File source = new File(filepath);
int index=amr.lastIndexOf(".");
wavFile=amr.substring(0,index)+".wav";
File target = new File(wavFile);
Au...
分类:
编程语言 时间:
2014-09-15 11:16:58
阅读次数:
275
经常有同学问“这么多技术我该怎么学,某某和某某两个技术哪个更有前途”。因此我写了下面的小文章,也算是和如鹏网所有同学的一个交流常见总结吧。一、这多东西啥时候能学完?现在IT新技术日新月异。就常用编程语言而言,有c/c++、汇编、java,c#、Python等;操作系统平台有unix/linux,wi...
分类:
其他好文 时间:
2014-09-14 16:41:37
阅读次数:
222
select a.pluno,a.pluname,a.spec,a.qty,d.qty,e.qty,a.dptno,substring(a.dptno,1,3),f.dptname,substring(a.dptno,1,4),g.dptname,substring(a.dptno,1,5),h.d...
分类:
其他好文 时间:
2014-09-14 15:16:07
阅读次数:
225
记录最大的起始位置+hash
int lengthOfLongestSubstring(string s) {
map charMap;
int curLen, maxLen = 0,lastIndex = -1;
for (int i = 0; i < s.size(); i++)
{
if (charMa...
分类:
其他好文 时间:
2014-09-14 12:53:27
阅读次数:
158
实现了两种方法,一种是DP,用循环做的,递归的话更简单。
string longestPalindrome(string s) {
int n = s.size();
bool dp[1001][1001];
int maxl = 1;
int maxs = 0;
for (int i = n - 1; i >= 0...
分类:
其他好文 时间:
2014-09-14 12:53:07
阅读次数:
190