整理自统计之都论坛
方法一 使用strsplit函数
a <- "aggcacggaaaaacgggaataacggaggaggacttggcacggcattacacggagg"
b <- strsplit(as.character(a),"ag")
length(b[[1]]) - 1 ##子字符串"ag"的出现个数
方法二 使用正则式函数
a <- "aggcacgg...
分类:
其他好文 时间:
2014-07-22 23:02:52
阅读次数:
288
无标题文档
$(function(){
//获取第一个option的值
var firstval=$('#selectID option:first').val();
alert(firstval);
//获取最后一个option的值
var lastval =$('#selectID option:last').val();
alert(lastval);...
分类:
Web程序 时间:
2014-07-22 23:02:15
阅读次数:
367
Last_IO_Error: Fatal error: The slave I/O thread
stops because master and slave have equal MySQL server ids; these ids must be
different for replicati...
分类:
数据库 时间:
2014-07-22 22:59:53
阅读次数:
614
1 //桶排序思想 2 //假如要排序的是数字是 2 4 5 5 5 8 8 9 1 1 3
#include 4 #define length 10 5 int main() 6 { 7 //数组元素值全部初始化为0 8 int
array[length]={0}; 9 ...
分类:
其他好文 时间:
2014-05-01 22:19:46
阅读次数:
342
题目: Given a string S, find the longest palindromic
substring in S. You may assume that the maximum length of S is 1000, and there
exists one unique lo...
分类:
其他好文 时间:
2014-05-01 20:07:13
阅读次数:
429
女人如花花芬芳自古英雄谁人当女人如酒酒飘香醉倒多少男儿郎难得三国周瑜将唯与小乔流水长一代君王唐明皇迷恋玉环如痴狂女人香 花芬芳男儿郎 谁人当女人香 流水长君莫让
女人伤多少红颜葬春光多少佳人空彷徨多少爱恨两茫茫多少孤零的鸳鸯女人香中有坚强经得起岁月风霜走过多少世间沧桑唯留下女人香
分类:
其他好文 时间:
2014-05-01 19:40:45
阅读次数:
269
/**js Unicode编码转换*/vardecToHex =function(str)
{varres=[];for(vari=0;i < str.length;i++)
res[i]=("00"+str.charCodeAt(i).toString(16)).slice(-4);return"...
分类:
Web程序 时间:
2014-05-01 19:36:51
阅读次数:
427
UIScrollView的几个要点总结:从你的手指touch屏幕开始,scrollView开始一个timer,如果:
1. 150ms内如果你的手指没有任何动作,消息就会传给subView。
2. 150ms内手指有明显的滑动(一个swipe动作),scrollView就会滚动,消息不会传给subView,这里就是产生问题二的原因。
3. 150ms内手指没有滑动,scrollView将...
分类:
其他好文 时间:
2014-05-01 18:07:00
阅读次数:
311
最近在做项目使用webview显示后,有写文档需要打开,找了一些资料,研究了一下,弄出来了!...
分类:
移动开发 时间:
2014-04-30 22:22:40
阅读次数:
296