Friday, January 11, 2008

Python vs Perl

From Dr. István Albert's link Python vs Perl

EXTERIOR: DAGOBAH--DAY


With Yoda strapped to his
back, Luke climbs up one of the many thick vines that grow in the swamp
until he reaches the Dagobah statistics lab. Panting heavily, he
continues his exercises--grepping, installing new packages, logging in
as root, and writing replacements for two-year-old shell scripts in
Python.


LukeYodaYODA:
Code! Yes. A programmer's strength flows from code maintainability. But
beware of Perl. Terse syntax... more than one way to do it... default
variables. The dark side of code maintainability are they. Easily they
flow, quick to join you when code you write. If once you start down the
dark path, forever will it dominate your destiny, consume you it will.



LUKE: Is Perl better than Python?



YODA:
No... no... no. Quicker, easier, more seductive.



LUKE:
But how will I know why Python is better than Perl?



YODA:
You will know. When your code you try to read six months from now.



--- written by: funkster@midwinter.com



Powered by ScribeFire.

Connection to Mysql with Jsp

//only a note, plz ignore this article if you do not need the information.

//for connection to mysql in linux with jsp
//Caution: I noticed that the word "string" can not work in jsp, "String" should be used!
//Set Privileges in Mysql, the host should be identified as "localhost.localdomain"
//prerequisite: Tomcat with JDBC driver, my system has been configured, so I skiped this step.


<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>

<%Class.forName("org.gjt.mm.mysql.Driver").newInstance();
String url ="jdbc:mysql://localhost:3306/database";
//replace the "database"
Connection conn= DriverManager.getConnection(url,"username","passwd");
//replace the username and passwd
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); String sql="select * from KEGG_ec";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()) {%>
<%=rs.getString(1)%>
<%=rs.getString(2)%>
<%}%>
<%out.print("...........");%>
<%rs.close(); stmt.close(); conn.close(); %>

//you may need detailed knowledge from books about jsp!

Sunday, January 6, 2008

PASS



Putative Active Sites with Spheres

PASS (Putative Active Sites with Spheres) is a simple computational tool that uses geometry to characterize regions of buried volume in proteins and to identify positions likely to represent binding sites based upon the size, shape, and burial extent of these volumes. PASS'S utility as a predictive tool for binding site identification is tested by predicting known binding sites of proteins in the PDB using both complexed macromolecules and their corresponding apo-protein structures. The results indicate that PASS can serve as a front-end to fast docking. The main utility of PASS lies in the fact that it can analyze a moderate-size protein (~ 30 kD) in under twenty seconds, which makes it suitable for interactive molecular modeling, protein database analysis, and aggressive virtual screening efforts. As a modeling tool, PASS (i) rapidly identifies favorable regions of the protein surface, (ii) simplifies visualization of residues modulating binding in these regions, and (iii) provides a means of directly visualizing buried volume, which is often inferred indirectly from curvature in a surface representation.

Ref: http://www.ccl.net/cca/software/UNIX/pass/overview.shtml