Scientific web programming Part 2 - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Scientific web programming Part 2

Description:

We don't need PHP to do what we just did. We can send output ... Substr() let's you cut out a piece of a string. http://us2.php.net/manual/en/ref.strings.php ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 21
Provided by: bcb9
Category:

less

Transcript and Presenter's Notes

Title: Scientific web programming Part 2


1
Scientific web programmingPart 2
  • (in which the saga continues)

2
PHP functions
  • We don't need PHP to do what we just did
  • We can send output just as easily in HTML
  • This is harder to do in HTML though

3
From numbers to nucleotides
4
ltifgt statement reformulated
5
Many choices ltswitchgt statement
6
Code re-use and functions
7
Short-hand notation
8
Intermezzo configuring PHP
  • What if shorthand fails?
  • Go to php.ini

9
Further compartmentalization
10
ltwhilegt loop
11
ltforgt loop
12
Help, Im lost! d
  • What to do if you need help?
  • Get to know your IDE
  • Syntax highlighting, intellicode (Ctrlspace)
  • Instant feedback on incorrect syntax
  • Tag matching
  • Should you buy a book on PHP?
  • Should you go to the library?
  • Another way go to http//www.php.net

13
Parameterized functions
14
Default values for arguments
15
Multiple functions
16
Built-in PHP fucntions
  • Luckily, many functions already exist
  • Functions that operate on text (strings)
  • Strlen() gives you the size of a string
  • Substr() lets you cut out a piece of a string
  • http//us2.php.net/manual/en/ref.strings.php
  • Mathematical functions
  • Rand(), round(), abs(), sin(), cos(), atan(),
    exp()
  • http//us2.php.net/manual/en/ref.math.php

17
Pop quiz
  • How many genes are there in
  • Saccharomyces cerevisiae (bakers yeast)?
  • Homo sapiens?
  • Arabidopsis thaliana?
  • How many forms of Ig are there?
  • Light chain combinations?
  • Heavy chain combinations?
  • Think DNA, RNA, protein data

18
Introducing arrays
  • When a simple string doesnt suffice
  • Use arrays
  • Different genes in a genome
  • Alternative splicing forms of a single gene
  • Example
  • http//us2.php.net/manual/en/function.array.php

19
Where to from here?
  • Exercises on covered material
  • Tuesday HTML forms, text files
  • Wednesday databases

20
Questions
  • http//lab.bcb.iastate.edu/training/webdev/nmsu
Write a Comment
User Comments (0)
About PowerShow.com