dp经典关于这道题,我看了网上大量的资料,发现整体思路是对的,但是细节解释是错的(或者说不到位)Len = strlen(say);
say是牛说的话,下面的word代表单词列表dp[i]表示从say中第i个字符开始,到第Len-1个字符(结尾处)这段区间所删除的字符数,初始化为dp[i]=len-...
分类:
其他好文 时间:
2014-06-13 08:27:32
阅读次数:
285
1)光标控制----------------* Ctrl + a 切换到命令行开始* Ctrl + e
切换到命令行末尾* Ctrl + l 清除屏幕内容,效果等同于clear2)剪切复制---------------* Ctrl + u 剪切清除光标之前的内容*
Ctrl + k 剪切清除光标之后...
分类:
其他好文 时间:
2014-06-13 08:26:05
阅读次数:
236
b1=b2=""b3="hello"if [[ -n "${b3}" ]]then echo "not
null"else echo "null"fib1 nullb2 nullb3 not null-n str 字符串长度非零
分类:
其他好文 时间:
2014-06-13 00:15:10
阅读次数:
241
================================第一步:网注册表中(HKEY_CLASSES_ROOT)添加项================================第二步:在网页上写上标签调用<ahref="xishui://hello">zhangdi://hello</a>================================显示效果:会弹出hello
分类:
Web程序 时间:
2014-06-10 23:03:49
阅读次数:
356
每次打开Office
2013都提示配置进度(包括Word、PPT、Excel等等Office产品都有这种现象),如图,先是显示“安装程序正在准备必要的文件”,接着显示“正在配置MicrosoftOfficeProfessional
Plus 2013"的情况。如果重启完了再打开,还是提示配置进度,...
分类:
其他好文 时间:
2014-06-10 20:17:12
阅读次数:
263
延续上一篇文章
上篇文章末尾有一段脚本,定义了一个Task:
task 'myTask' {
doLast {
println 'hello world!'
}
}
我们已经知道,这段脚本其实是调用Project的task方法,并且传入两个参数:一个是Task的名字,另外一个是闭包,用来配置Task(在这段脚本中,给Task添加了一个A...
分类:
其他好文 时间:
2014-06-10 18:17:46
阅读次数:
265
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-space ch...
分类:
其他好文 时间:
2014-06-10 11:12:06
阅读次数:
185
咳咳,这一章节应该是连载编译器的DIY的,可是在做DIY之前先用flex 来练练手,对于后面的理解有帮助作用。
在word 中我经常看到有一个单词统计的功能,那么是怎么来实现的了,当然第一个念头就是遍历整个文本依据换行和空格对字符串进行分析,那么这是可行的。可是能不能简单点了,其实对文本做单词分析,大家都知道怎么做,难得地方可能就是代码的实现了,那么现在如果使用正则表达式来实现的话,那么一切问题...
分类:
其他好文 时间:
2014-06-10 10:56:00
阅读次数:
177
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2014-06-10 10:52:03
阅读次数:
180
index9.html 模块加载器
这里的某块加载器实现的是commonJs规范,完全和nodeJs的模块加载器相同模块定义exports.txt = "hello
word";module.exports={ "name":"张三"}这里有不懂得可以查下commo...
分类:
Web程序 时间:
2014-06-10 10:33:49
阅读次数:
269