• iPhone/iPad上的mail很好用,可有时候会遇到囧事,新设置邮箱或者刷新系统后,几百封的邮件全都变成了未读,原始系统没有提供任何批量标记为已读的方法(至少目前为止我没发现,有同学知道的请不吝赐教),只能一封一封的手动标记,很郁闷有木有?解决方法方法有两个:

    1. 使用IMAP协议接收邮件

    对于支持IMAP的邮箱,采用IMAP协议而非pop协议接收邮件(具体设置请参照邮箱帮助文档),由于IMAP支持在服务器保留消息状态信息,因此阅读状态也得到了同步。但此法对不支持IMAP的邮箱无效。

    2. 使用App "PopMark" 进行批量标记

    在cydia中添加源http://cydia.xsellize.com,具体添加方法请参考http://iphone.tgbus.com/tutorial/use/200809/20080901184047.shtml。然后进入cydia,搜索PopMark,其中BigBoss的源收费$1.99,xSellize的源免费,安装xSellize源下的PopMark,安装过程完成后需要点击最下面的按钮重启。

    完成后,运行PopMark,点击“Mark All as Read”按钮,一小会就自动退出,此时邮件已经全部标为已读。

     

    支持原创,转载请表明出处。

    欢迎关注我的新浪微博http://weibo.com/biojinxin

     

  • 有时需要反复执行一段R代码,并使用不同得参数,可以将代码用文本编辑器写为R脚本(*.R),在第一行加入

    Args <- commandArgs()

    然后通过

    Rscript *.R 参数1 参数2 ...

    执行脚本。

    脚本中

    Args[6]==参数1

    Args[7]==参数2

    ...

  •  

    • chr

      chr(65) is "A" in either ASCII or Unicode, and chr(0x263a) is a Unicode smiley face.

      Negative values give the Unicode replacement character (chr(0xfffd)), except under the bytes pragma, where low eight bits of the value (truncated to an integer) are used.

      If NUMBER is omitted, uses $_ .

      For the reverse, use "ord".

      Note that characters from 128 to 255 (inclusive) are by default internally not encoded as UTF-8 for backward compatibility reasons.

      See perlunicode for more about Unicode.

    • ref:http://perldoc.perl.org/functions/chr.html
  • 取当前路径
    currentpath=$PWD
     
    遍历根目录
    for file in /*
      do
      if test -f $file
      then
        echo 是文件
      fi
      if test -d $file
      then
        echo 是目录
      fi
      if test -x $file
      then
        echo 可执行
      fi
      if test -w $file
      then
        echo 可写
      fi
      echo $file
    done
  • 用msort将如下类型的文件先按染色体排序,后按染色体上的位置排序:

     43646876        Deletion        77      77      chr2    26555562        26555563       
     58200968        Deletion        17      17      chr2    27291325        27291326     
     42244408        Deletion        36      36      chr2    28403299        28403303     

     

    msort -km5[4-] -km6

    [4-]表示截取列的第4到最后的字符作为关键字 

    =============================

    msort 下载

    http://soap.genomics.org.cn/down/msort.tar.gz