问题:最后一个单词的长度分析,注意s=" a b "这种情况,从后遍历单词,遇到空格退出class Solution {public: int lengthOfLastWord(const char *s) { int len=strlen(s); int sum=...
分类:
其他好文 时间:
2014-08-06 22:02:22
阅读次数:
209
App中若需要显示pdf、word文档,这时候没有其他控件,比UIWebView更适合,它高度抽象了技术细节,可以很简单的使用
UIWebView可打开文件类型列表
(需要iOS3.0系统以上)
可以看到Excel、PPT、PDF、Word都可打开。
点击可下载打开PDF的Demo
将UIWebView加入到界面,获得源文件路径,打开文件 NSString *pat...
分类:
Web程序 时间:
2014-08-06 18:58:22
阅读次数:
276
Create Function sf_ShortCode( @Input nvarchar(4000), --输入的文字 @Kind Int=0 --0:拼音;1:五笔)Returns nvarchar(10)AsBegin declare @word nchar(1),...
分类:
其他好文 时间:
2014-08-06 18:56:41
阅读次数:
9989
# include
# include
# include
# include
# include
using namespace std;
int main()
{
string s,t;
int flag;
mapq;
while(cin>>s&&s!="XXXXXX")
{
t=s;
sort(s.begin(),s.end());
q[t]=s;
}
w...
分类:
其他好文 时间:
2014-08-06 11:56:21
阅读次数:
184
经常在PLSQL Developer的SQL窗口编写各种语句,当需要保存这些语句时,可以另存为文本文件,也可以复制后粘贴到Word文件中,放在Word文件中的好处是语句保留原来的格式,可以清楚的区分关键字、常数等,不过当语句中包含汉字时,粘贴到Word中语句汉字却显示不出来...
分类:
数据库 时间:
2014-08-06 10:37:31
阅读次数:
250
给出两个字符串,寻找一个字符串在另外一个字符串出现的频率。
原来kmp还有一个陷阱,下面注释出了,下标没步进好,就有一定几率出现超时的,也有一定几率出现错误,视具体的串而定。
修改一下就好了,kmp速度是很快的。
#include
#include
const int MAX_TXT = 1000001;
const int MAX_WORD = 10001;
int ...
分类:
其他好文 时间:
2014-08-06 01:59:00
阅读次数:
195
当我们设置我的的div,或者其它文本框固定宽度之后,文本内容过多就会出文本溢出(显示在区域外面,不换行的情况)。
这时我们可以使用Css中的几个属于来解。有以下的三个属于可以解决问题:
1,word-break 属性规定自动换行的处理方法。
word-break: normal|break-all|keep-all;
值
描述
normal
...
分类:
Web程序 时间:
2014-08-06 01:57:30
阅读次数:
210
题目:Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can b....
分类:
编程语言 时间:
2014-08-06 01:52:30
阅读次数:
251
题目:Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter...
分类:
编程语言 时间:
2014-08-06 01:35:30
阅读次数:
389