Skip to content

Instantly share code, notes, and snippets.

sub min_scalar(@xs,@ys) {
[+] @xs.sort <<*>> @ys.sort.reverse;
}
# test
say min_scalar([1..5],[1,0,1,0,1]); # 6
say min_scalar([1,3,-5],[-2,4,1]); # -25
whileif;
sub whileif {
my @a = 0..9;
my $i = 0;
while $i < 10 {
my $a=@a[$i];
say $a;
if $a < 1 {
say "less than 1";
import scala.math._
/* cacluate pi
Pi = 4*(1 - 1/3 + 1/5 -1/7+....)
write a function that calculates pi to an accuracy of 5 decimal places
*/
// 1/(2*x+1)*4<1e-6
//4*1e6<2*x+1
// x>(4*1e6-1)/2
#!/usr/bin/perl
use strict;
use warnings;
# the specification is https://dl.dropbox.com/u/40857893/cv/spTag_database_creation.docx
# the input file is https://dl.dropbox.com/u/40857893/cv/Input.fasta
#use Bio::SeqIO; fail to install the bioperl, so analysis the seq manually
my %mass_table=(
@swuecho
swuecho / 001
Created October 10, 2012 03:29
[Words and their stories] nose and ear
[>d]
[0:00.0]
[0:00.1]
[0:05.3]
[0:11.0] Now the VOA special English program
[0:15.0] "words and their stories"
[0:17.9] A person's nose is important for breathing and smelling.
@swuecho
swuecho / vocabular.md
Created October 10, 2012 15:03
vocabulary

Important vocabulary

  • interfere
  • property
  • utility
  • muslims
  • Bangalore
  • offensive
  • contentious
@swuecho
swuecho / 003
Created October 10, 2012 16:10
[Words and their stories] Mouth
[>d]
[0:00.0]
[0:02.9]
[0:08.1]
[0:13.2] Now the VOA special English program
[0:17.4] Words and their stories
[0:20.3] people use their mouths for many things
@swuecho
swuecho / Znar_seminar.md
Created October 10, 2012 18:00
Znar seminar

Date: Oct 22

Introduction

Background

3 b/y

Management Stategies

@swuecho
swuecho / life_rule.md
Created October 13, 2012 01:21
The Life

厚黑学

  • 说话要好听,做事要绝

@swuecho
swuecho / cell_wall.md
Created October 14, 2012 20:40
Cell Wall synthesis

cell wall biogenesis

  • substrate generation
  • polymer synthesis
  • secretion
  • assembly
  • rearrangement during development
  • disassembly