Reverse Words in a String

摘要: 源自leetcode上的一道题。题目为:Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "bl... 阅读全文
posted @ 2014-07-10 20:26 单倍体 阅读(181) 评论(0) 推荐(0)

javascript定时触发

摘要: 用javascript写个定时器,定时触发某个特定功能:js定时触发某个function<input name="txtTimer" value="10秒"><script LANGUAGE=javascript><!--function setup(cmd) {$('#_form').attr('action', 'pipe_setup.do');$('input[name=cmd]').val(cmd);$('#_form').submit( 阅读全文
posted @ 2012-12-31 22:37 单倍体 阅读(161) 评论(0) 推荐(0)

访问XML的selectsinglenode方法

摘要: http://blog.csdn.net/wf520pb/article/details/2644549无耻收藏PS:当遇到所有人都这么说,但怎么做都不对的情况时,问题往往在自己这里。 阅读全文
posted @ 2012-12-31 14:08 单倍体 阅读(93) 评论(0) 推荐(0)

关于素数问题

摘要: 本来是要解决一个给定一个数求其最大素数因子的问题,结果题目理解错了,以为是求最大素数,绕了个弯,不过收获也多。首先是数据类型问题。给定的数是千亿级别的(十进制表示有12位长),因此用Int,long之类统统不行。所以就去查了下,结果发现在Long以上还有用8bytes存储的数据类型long long等。很无耻地把人家归纳的东西搬过来,方便日后查用。TypeSize数值范围无值型void0 byte无值域布尔型bool 1 bytetrue false有符号短整型short [int] /signed short [int]2 byte-32768~32767无符号短整型unsigned sho 阅读全文
posted @ 2012-12-12 13:32 单倍体 阅读(169) 评论(0) 推荐(0)