function wrapText(context, text, x, y,
maxWidth, lineHeight) { var words = text.split(" "); var line = ""; for (var
n...
分类:
其他好文 时间:
2014-05-24 07:58:42
阅读次数:
244
//冒泡排序 从小到大对一组数排序function mp($array){ $count =
count($array); if ($count $i; $k--) { if($array[$k] "; } return $...
分类:
Web程序 时间:
2014-05-23 05:39:26
阅读次数:
284
timei;placehubei kindergarten
school;Jobjob=newJob();intmaney=0;Stringgains; int Girls_Count=0;
for(i=8:30;i<=18:30;i++) {if((i-8:30)%60==0) { maney+=...
分类:
其他好文 时间:
2014-05-23 04:29:38
阅读次数:
230
Given an input string, reverse the string word
by word.For example,Given s = "the sky is blue",return "blue is sky the". 1
Class Solution{ 2 public: ....
分类:
其他好文 时间:
2014-05-23 02:59:21
阅读次数:
260
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
public class TraditionalTimerTest {
static int count;
public static void main(String[] args) {
class MyTimerTask exte...
分类:
其他好文 时间:
2014-05-23 01:45:11
阅读次数:
226
题目:
Alibaba笔试题:给定一段产品的英文描述,包含M个英文字母,每个英文单词以空格分隔,无其他标点符号;
再给定N个英文单词关键 字,请说明思路并编程实现方法String extractSummary(String description,String[] key words),
目标是找出此产品描述中包含N个关键字(每个关键词至少出现一次)的长度最短的子串,作为产品简介输出。(不限...
分类:
其他好文 时间:
2014-05-22 22:37:55
阅读次数:
405
问题:给定一个字符串,字符串中包含若干单词,每个单词间由空格分隔,将单词逆置,即第一个单词成为最后一个单词,一次类推。
说明:字符串本身可能包含前导空格或后导空格,单词间可能包含多个空格,要求结果中去掉前导和后导空格,单词间空格只保留一个。
与rotate函数类似,先逆置每个单词,再将所有字符串逆置。
void reverseWords(string &s) {
if(s.si...
分类:
其他好文 时间:
2014-05-22 18:49:26
阅读次数:
249
v2.0更新内容:
1.支持Mybatis缓存,count和分页同时支持(二者同步)
2.修改拦截器签名,拦截Executor,签名如下:
@Intercepts(@Signature(type = Executor.class, method = "query", args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}))
3.将Page类移到外面,方便调用...
分类:
其他好文 时间:
2014-05-21 16:24:50
阅读次数:
395
【题目】
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one 1" or 11.
11 is read off as "two 1s" or 21.
21 is read off as "one 2, then one 1" or 1211.
Given an integer n, generate...
分类:
其他好文 时间:
2014-05-21 15:20:07
阅读次数:
213
v2.0更新内容:
1.支持Mybatis缓存,count和分页同时支持(二者同步)
2.修改拦截器签名,拦截Executor,签名如下:
@Intercepts(@Signature(type = Executor.class, method = "query", args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}))
3.将Page类移到外面,方便调用...
分类:
其他好文 时间:
2014-05-21 14:40:56
阅读次数:
408