How To Write A Web Programming Textbook
|
|
|
- Coral Davis
- 5 years ago
- Views:
Transcription
1 Web Programming Step by Step Chapter 5 PHP for Server-Side Programming Except where otherwise noted, the contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller. 5.1: Server-Side Basics 5.1: Server-Side Basics 5.2: PHP Basic Syntax 5.3: Embedded PHP 5.4: Advanced PHP Syntax
2 URLs and web servers usually when you type a URL in your browser: your computer looks up the server's IP address using DNS your browser connects to that IP address and requests the given file the web server software (e.g. Apache) grabs that file from the server's local file system, and sends back its contents to you some URLs actually specify programs that the web server should run, and then send their output back to you as the result: the above URL tells the server webster.cs.washington.edu to run the program quote2.php and send back its output Server-Side web programming server-side pages are programs written using one of many web programming languages/frameworks examples: PHP, Java/JSP, Ruby on Rails, ASP.NET, Python, Perl the web server contains software that allows it to run those programs and send back their output as responses to web requests each language/framework has its pros and cons we use PHP for server-side programming in this textbook
3 What is PHP? (5.1.2) PHP stands for "PHP Hypertext Preprocessor" a server-side scripting language used to make web pages dynamic: provide different content depending on context interface with other services: database, , etc authenticate users process form information PHP code can be embedded in XHTML code Lifecycle of a PHP web request (5.1.1) browser requests a.html file (static content): server just sends that file browser requests a.php file (dynamic content): server reads it, runs any script code inside it, then sends result across the network script produces output that becomes the response sent back
4 Why PHP? There are many other options for server-side languages: Ruby on Rails, JSP, ASP.NET, etc. Why choose PHP? free and open source: anyone can run a PHP-enabled server free of charge compatible: supported by most popular web servers simple: lots of built-in functionality; familiar syntax available: installed on UW's servers (Dante, Webster) and most commercial web hosts Hello, World! The following contents could go into a file hello.php: print "Hello, world!"; Hello, world! a block or file of PHP code begins with and ends with PHP statements, function declarations, etc. appear between these endpoints
5 Viewing PHP output you can't view your.php page on your local hard drive; you'll either see nothing or see the PHP source code if you upload the file to a PHP-enabled web server, requesting the.php file will run the program and send you back its output 5.2: PHP Basic Syntax 5.1: Server-Side Basics 5.2: PHP Basic Syntax 5.3: Embedded PHP 5.4: Advanced PHP Syntax
6 Console output: print (5.2.2) print "text"; print "Hello, World!\n"; print "Escape \"chars\" are the SAME as in Java!\n"; print "You can have line breaks in a string."; print 'A string can use "single-quotes". It\'s cool!'; Hello, World! Escape "chars" are the SAME as in Java! You can have line breaks in a string. A string can use "single-quotes". It's cool! some PHP programmers use the equivalent echo instead of print Variables (5.2.5) $name = expression; $user_name = "PinkHeartLuvr78"; $age = 16; $drinking_age = $age + 5; $this_class_rocks = TRUE; names are case sensitive; separate multiple words with _ names always begin with $, on both declaration and usage always implicitly declared by assignment (type is not written) a loosely typed language (like JavaScript or Python)
7 Types (5.2.3) basic types: int, float, boolean, string, array, object, NULL test what type a variable is with is_type functions, e.g. is_string gettype function returns a variable's type as a string (not often needed) PHP converts between types automatically in many cases: string int auto-conversion on + int float auto-conversion on / type-cast with (type): $age = (int) "21"; Operators (5.2.4) + - * / % = += -= *= /= %=.= ==!= ===!== > < >= <= &&! == just checks value ("5.0" == 5 is TRUE) === also checks type ("5" === 5 is FALSE) many operators auto-convert types: 5 < "7" is TRUE
8 int and float types $a = 7 / 2; # float: 3.5 $b = (int) $a; # int: 3 $c = round($a); # float: 4.0 $d = "123"; # string: "123" $e = (int) $d; # int: 123 int for integers and float for reals division between two int values can produce a float Math operations $a = 3; $b = 4; $c = sqrt(pow($a, 2) + pow($b, 2)); abs ceil cos floor log log10 max min pow rand round sin sqrt tan math functions M_PI M_E M_LN2 math constants the syntax for method calls, parameters, returns is the same as Java
9 Comments (5.2.7) # single-line comment // single-line comment /* multi-line comment */ like Java, but # is also allowed a lot of PHP code uses # comments instead of // we recommend # and will use it in our examples String type (5.2.6) $favorite_food = "Ethiopian"; print $favorite_food[2]; # h zero-based indexing using bracket notation string concatenation operator is. (period), not "2 turtle doves" === 7 5. "2 turtle doves" === "52 turtle doves" can be specified with "" or ''
10 String functions $name = "Kenneth Kuan"; $length = strlen($name); # 12 $cmp = strcmp($name, "Jeff Prouty"); # > 0 $index = strpos($name, "e"); # 1 $first = substr($name, 8, 4); # "Kuan" $name = strtoupper($name); # "KENNETH KUAN" Name Java Equivalent explode, implode split, join strlen length strcmp compareto strpos indexof substr substring strtolower, strtoupper tolowercase, touppercase trim trim Interpreted strings $age = 16; print "You are ". $age. " years old.\n"; print "You are $age years old.\n"; # You are 16 years old. strings inside " " are interpreted variables that appear inside them will have their values inserted into the string strings inside ' ' are not interpreted: print 'You are $age years old.\n'; # You are $age years old.\n if necessary to avoid ambiguity, can enclose variable in {: print "Today is your $ageth birthday.\n"; print "Today is your {$ageth birthday.\n"; # $ageth not found
11 for loop (same as Java) (5.2.9) for (initialization; condition; update) { statements; for ($i = 0; $i < 10; $i++) { print "$i squared is ". $i * $i. ".\n"; bool (Boolean) type (5.2.8) $feels_like_summer = FALSE; $php_is_rad = TRUE; $student_count = 217; $nonzero = (bool) $student_count; # TRUE the following values are considered to be FALSE (all others are TRUE): 0 and 0.0 (but NOT 0.00 or 0.000) "", "0", and NULL (includes unset variables) arrays with 0 elements can cast to boolean using (bool) FALSE prints as an empty string (no output); TRUE prints as a 1 TRUE and FALSE keywords are case insensitive
12 if/else statement if (condition) { statements; elseif (condition) { statements; else { statements; NOTE: although elseif keyword is much more common, else if is also supported while loop (same as Java) while (condition) { statements; do { statements; while (condition); break and continue keywords also behave as in Java
13 NULL $name = "Victoria"; $name = NULL; if (isset($name)) { print "This line isn't going to be reached.\n"; a variable is NULL if it has not been set to any value (undefined variables) it has been assigned the constant NULL it has been deleted using the unset function can test if a variable is NULL using the isset function NULL prints as an empty string (no output) 5.3: Embedded PHP 5.1: Server-Side Basics 5.2: PHP Basic Syntax 5.3: Embedded PHP 5.4: Advanced PHP Syntax
14 Embedding code in web pages most PHP programs actually produce HTML as their output dynamic pages; responses to HTML form submissions; etc. an embedded PHP program is a file that contains a mixture of HTML and PHP code A bad way to produce HTML in PHP print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n"; print " \" print "<html xmlns=\" print " <head>\n"; print " <title>my web page</title>\n";... printing HTML code with print statements is ugly and error-prone: must quote the HTML and escape special characters, e.g. \" must insert manual \n line breaks after each line don't print HTML; it's bad style!
15 Syntax for embedded PHP (5.3.1) HTML content PHP code HTML content any contents of a.php file that are not between and are output as pure HTML can switch back and forth between HTML and PHP "modes" Embedded PHP example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" " <html xmlns=" <head><title>cse 190 M: Embedded PHP</title></head> <body> <h1>geneva's Counting Page</h1> <p>watch how high I can count: for ($i = 1; $i <= 10; $i++) { print "$i\n"; </p> </body> </html> the above code would be saved into a file such as count.php How many lines of numbers will appear? (View Source!)
16 Embedded PHP + print = bad... <h1>geneva's Counting Page</h1> <p>watch how high I can count: for ($i = 1; $i <= 10; $i++) { print "$i\n"; </p> best PHP style is to use as few print/echo statements as possible in embedded PHP code but without print, how do we insert dynamic content into the page? PHP expression blocks (5.3.2) <?= expression <h2>the answer is <?= 6 * 7 </h2> The answer is 42 PHP expression block: a small piece of PHP that evaluates and embeds an expression's value into HTML <?= expression is equivalent to: print expression; useful for embedding a small amount of PHP (a variable's or expression's value) in a large block of HTML without having to switch to "PHP-mode"
17 Expression block example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" " <html xmlns=" <head><title>cse 190 M: Embedded PHP</title></head> <body> for ($i = 99; $i >= 1; $i--) { <p><?= $i bottles of beer on the wall, <br /> <?= $i bottles of beer. <br /> Take one down, pass it around, <br /> <?= $i - 1 bottles of beer on the wall.</p> </body> </html> this code could go into a file named beer.php Common error: unclosed braces... <body> <p>watch how high I can count: for ($i = 1; $i <= 10; $i++) { <?= $i </p> </body> </html> if you open a { brace, you must have a matching brace later </body> and </html> above are inside the for loop, which is never closed if you forget to close your braces, you'll see an error about 'unexpected $end'
18 Common error fixed... <body> <p>watch how high I can count: for ($i = 1; $i <= 10; $i++) { # PHP mode <?= $i <!-- HTML mode --> # PHP mode </p> </body> </html> Common error: Missing = sign... <body> <p>watch how high I can count: for ($i = 1; $i <= 10; $i++) { <? $i </p> </body> </html> a block between <?... is often interpreted the same as one between... PHP evaluates the code, but $i does not produce any output
19 Complex expression blocks... <body> for ($i = 1; $i <= 3; $i++) { <h<?= $i >This is a level <?= $i heading.</h<?= $i > </body> This is a level 1 heading. This is a level 2 heading. This is a level 3 heading. expression blocks can even go inside HTML tags and attributes 5.4: Advanced PHP Syntax 5.1: Server-Side Basics 5.2: PHP Basic Syntax 5.3: Embedded PHP 5.4: Advanced PHP Syntax
20 Functions (5.4.1) function name(parametername,..., parametername) { statements; function quadratic($a, $b, $c) { return -$b + sqrt($b * $b - 4 * $a * $c) / (2 * $a); parameter types and return types are not written Calling functions name(parametervalue,..., parametervalue); $x = -2; $a = 3; $root = quadratic(1, $x, $a - 2); if the wrong number of parameters are passed, it's an error
21 Default parameter values function name(parametername,..., parametername) { statements; function print_separated($str, $separator = ", ") { if (strlen($str) > 0) { print $str[0]; for ($i = 1; $i < strlen($str); $i++) { print $sep. $str[$i]; print_separated("hello"); # h, e, l, l, o print_separated("hello", "-"); # h-e-l-l-o if no value is passed, the default will be used (defaults must come last) Variable scope: global and local vars $school = "UW";... function downgrade() { global $school; $suffix = "Tacoma"; # global # local $school = "$school $suffix"; print "$school\n"; variables declared in a function are local to that function variables not declared in a function are global if a function wants to use a global variable, it must have a global statement
22 Including files: include() (5.4.2) include("filename"); include("header.php"); inserts the entire contents of the given file into the PHP script's output page encourages modularity useful for defining reused functions like form-checking Arrays (5.4.3) $name = array(); $name = array(value0, value1,..., valuen); $name[index] $name[index] = value; $name[] = value; # create # get element value # set element value # append $a = array(); # empty array (length 0) $a[0] = 23; # stores 23 at index 0 (length 1) $a2 = array("some", "strings", "in", "an", "array"); $a2[] = "Ooh!"; # add string to end (at index 5) to append, use bracket notation without specifying an index element type is not specified; can mix types
23 Array functions function name(s) count print_r array_pop, array_push, array_shift, array_unshift in_array, array_search, array_reverse, sort, rsort, shuffle array_fill, array_merge, array_intersect, array_diff, array_slice, range array_sum, array_product, array_unique, array_filter, array_reduce description number of elements in the array print array's contents using array as a stack/queue searching and reordering creating, filling, filtering processing elements Array function example $tas = array("md", "BH", "KK", "HM", "JP"); for ($i = 0; $i < count($tas); $i++) { $tas[$i] = strtolower($tas[$i]); # ("md", "bh", "kk", "hm", "jp") $morgan = array_shift($tas); # ("bh", "kk", "hm", "jp") array_pop($tas); # ("bh", "kk", "hm") array_push($tas, "ms"); # ("bh", "kk", "hm", "ms") array_reverse($tas); # ("ms", "hm", "kk", "bh") sort($tas); # ("bh", "hm", "kk", "ms") $best = array_slice($tas, 1, 2); # ("hm", "kk") the array in PHP replaces many other collections in Java list, stack, queue, set, map,...
24 The foreach loop (5.4.4) foreach ($array as $variablename) {... $stooges = array("larry", "Moe", "Curly", "Shemp"); for ($i = 0; $i < count($stooges); $i++) { print "Moe slaps {$stooges[$i]\n"; foreach ($stooges as $stooge) { print "Moe slaps $stooge\n"; # even himself! a convenient way to loop over each element of an array without indexes Splitting/joining strings $array = explode(delimiter, string); $string = implode(delimiter, array); $s = "CSE 190 M"; $a = explode(" ", $s); # ("CSE", "190", "M") $s2 = implode("...", $a); # "CSE M" explode and implode convert between strings and arrays for more complex string splitting, we'll use regular expressions (later)
25 Unpacking an array: list list($var1,..., $varn) = array; $line = "stepp:17:m:94"; list($username, $age, $gender, $iq) = explode(":", $line); the list function accepts a comma-separated list of variable names as parameters assign an array (or the result of a function that returns an array) to store that array's contents into the variables Non-consecutive arrays $autobots = array("optimus", "Bumblebee", "Grimlock"); $autobots[100] = "Hotrod"; the indexes in an array do not need to be consecutive the above array has a count of 4, with 97 blank elements between "Grimlock" and "Hotrod"
26 PHP file I/O functions (5.4.5) reading/writing entire files: file_get_contents, file_put_contents asking for information: file_exists, filesize, fileperms, filemtime, is_dir, is_readable, is_writable, disk_free_space manipulating files and directories: copy, rename, unlink, chmod, chgrp, chown, mkdir, rmdir reading directories: scandir, glob Reading/writing files $text = file_get_contents("schedule.txt"); $lines = explode("\n", $text); $lines = array_reverse($lines); $text = implode("\n", $lines); file_put_contents("schedule.txt", $text); file_get_contents returns entire contents of a file as a string if the file doesn't exist, you'll get a warning file_put_contents writes a string into a file, replacing any prior contents
27 Reading files example # Returns how many lines in this file are empty or just spaces. function count_blank_lines($file_name) { $text = file_get_contents($file_name); $lines = explode("\n", $text); $count = 0; foreach ($lines as $line) { if (strlen(trim($line)) == 0) { $count++; return $count;... print count_blank_lines("ch05-php.html"); Reading directories $folder = "images"; $files = scandir($folder); foreach ($files as $file) { if ($file!= "." && $file!= "..") { print "I found an image: $folder/$file\n"; scandir returns an array of all files in a given directory annoyingly, the current directory (".") and parent directory ("..") are included in the array; you probably want to skip them
Embedded PHP. Web services vs. embedded PHP. CSE 190 M (Web Programming), Spring 2008 University of Washington
Embedded PHP CSE 190 M (Web Programming), Spring 2008 University of Washington Except where otherwise noted, the contents of this presentation are Copyright 2008 Marty Stepp and Jessica Miller and are
Web Programming Step by Step
Web Programming Step by Step Lecture 13 Introduction to JavaScript Reading: 7.1-7.4 Except where otherwise noted, the contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller. Client-side
PHP Tutorial From beginner to master
PHP Tutorial From beginner to master PHP is a powerful tool for making dynamic and interactive Web pages. PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
ESPResSo Summer School 2012
ESPResSo Summer School 2012 Introduction to Tcl Pedro A. Sánchez Institute for Computational Physics Allmandring 3 D-70569 Stuttgart Germany http://www.icp.uni-stuttgart.de 2/26 Outline History, Characteristics,
JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved.
1 6 JavaScript: Introduction to Scripting 2 Comment is free, but facts are sacred. C. P. Scott The creditor hath a better memory than the debtor. James Howell When faced with a decision, I always ask,
Exercise 1: Python Language Basics
Exercise 1: Python Language Basics In this exercise we will cover the basic principles of the Python language. All languages have a standard set of functionality including the ability to comment code,
Web development... the server side (of the force)
Web development... the server side (of the force) Fabien POULARD Document under license Creative Commons Attribution Share Alike 2.5 http://www.creativecommons.org/learnmore Web development... the server
Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY
Advanced Web Development Duration: 6 Months SCOPE OF WEB DEVELOPMENT INDUSTRY Web development jobs have taken thе hot seat when it comes to career opportunities and positions as a Web developer, as every
Short notes on webpage programming languages
Short notes on webpage programming languages What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language is a set of
Fachgebiet Technische Informatik, Joachim Zumbrägel
Computer Network Lab 2015 Fachgebiet Technische Informatik, Joachim Zumbrägel Overview Internet Internet Protocols Fundamentals about HTTP Communication HTTP-Server, mode of operation Static/Dynamic Webpages
Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence
Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Introduction Client-Side scripting involves using programming technologies to build web pages and applications that are run on the client (i.e.
PHP and XML. Brian J. Stafford, Mark McIntyre and Fraser Gallop
What is PHP? PHP and XML Brian J. Stafford, Mark McIntyre and Fraser Gallop PHP is a server-side tool for creating dynamic web pages. PHP pages consist of both HTML and program logic. One of the advantages
Introduction to Python
Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment
Intro to Web Programming. using PHP, HTTP, CSS, and Javascript Layton Smith CSE 4000
Intro to Web Programming using PHP, HTTP, CSS, and Javascript Layton Smith CSE 4000 Intro Types in PHP Advanced String Manipulation The foreach construct $_REQUEST environmental variable Correction on
6.170 Tutorial 3 - Ruby Basics
6.170 Tutorial 3 - Ruby Basics Prerequisites 1. Have Ruby installed on your computer a. If you use Mac/Linux, Ruby should already be preinstalled on your machine. b. If you have a Windows Machine, you
Introduction to Server-Side Programming. Charles Liu
Introduction to Server-Side Programming Charles Liu Overview 1. Basics of HTTP 2. PHP syntax 3. Server-side programming 4. Connecting to MySQL Request to a Static Site Server: 1. Homepage lookup 2. Send
Facebook Twitter YouTube Google Plus Website Email
PHP MySQL COURSE WITH OOP COURSE COVERS: PHP MySQL OBJECT ORIENTED PROGRAMMING WITH PHP SYLLABUS PHP 1. Writing PHP scripts- Writing PHP scripts, learn about PHP code structure, how to write and execute
Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation
Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation Credit-By-Assessment (CBA) Competency List Written Assessment Competency List Introduction to the Internet
PHP Debugging. Draft: March 19, 2013 2013 Christopher Vickery
PHP Debugging Draft: March 19, 2013 2013 Christopher Vickery Introduction Debugging is the art of locating errors in your code. There are three types of errors to deal with: 1. Syntax errors: When code
Instructor: Betty O Neil
Introduction to Web Application Development, for CS437/637 Instructor: Betty O Neil 1 Introduction: Internet vs. World Wide Web Internet is an interconnected network of thousands of networks and millions
Real SQL Programming 1
Real 1 We have seen only how SQL is used at the generic query interface an environment where we sit at a terminal and ask queries of a database. Reality is almost always different: conventional programs
10CS73:Web Programming
10CS73:Web Programming Question Bank Fundamentals of Web: 1.What is WWW? 2. What are domain names? Explain domain name conversion with diagram 3.What are the difference between web browser and web server
Certified PHP/MySQL Web Developer Course
Course Duration : 3 Months (120 Hours) Day 1 Introduction to PHP 1.PHP web architecture 2.PHP wamp server installation 3.First PHP program 4.HTML with php 5.Comments and PHP manual usage Day 2 Variables,
ISI ACADEMY Web applications Programming Diploma using PHP& MySQL
ISI ACADEMY for PHP& MySQL web applications Programming ISI ACADEMY Web applications Programming Diploma using PHP& MySQL HTML - CSS - JavaScript PHP - MYSQL What You'll Learn Be able to write, deploy,
The C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
4PSA DNS Manager 3.7.0. Translator's Manual
4PSA DNS Manager 3.7.0 Translator's Manual For more information about 4PSA DNS Manager, check: http://www.4psa.com Copyrights 2002-2010 Rack-Soft, Inc. Translator's Manual Manual Version 48807.9 at 2010/03/10
Introduction to web development
Santiago Canyon College CIS-132: Introduction to JavaScript Lesson 1 Introduction to web development (Chapter 1 in Murach s JavaScript & DOM Scripting textbook) Slide 1 Objectives Applied Load a web page
INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL
INFORMATION BROCHURE OF Certificate Course in Web Design Using PHP/MySQL National Institute of Electronics & Information Technology (An Autonomous Scientific Society of Department of Information Technology,
Computers. An Introduction to Programming with Python. Programming Languages. Programs and Programming. CCHSG Visit June 2014. Dr.-Ing.
Computers An Introduction to Programming with Python CCHSG Visit June 2014 Dr.-Ing. Norbert Völker Many computing devices are embedded Can you think of computers/ computing devices you may have in your
Example for Using the PrestaShop Web Service : CRUD
Example for Using the PrestaShop Web Service : CRUD This tutorial shows you how to use the PrestaShop web service with PHP library by creating a "CRUD". Prerequisites: - PrestaShop 1.4 installed on a server
Introduction to web development and JavaScript
Objectives Chapter 1 Introduction to web development and JavaScript Applied Load a web page from the Internet or an intranet into a web browser. View the source code for a web page in a web browser. Knowledge
THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY
THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY As the constantly growing demands of businesses and organizations operating in a global economy cause an increased
Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
JavaScript: Client-Side Scripting. Chapter 6
JavaScript: Client-Side Scripting Chapter 6 Textbook to be published by Pearson Ed 2015 in early Pearson 2014 Fundamentals of Web http://www.funwebdev.com Development Section 1 of 8 WHAT IS JAVASCRIPT
CS106A, Stanford Handout #38. Strings and Chars
CS106A, Stanford Handout #38 Fall, 2004-05 Nick Parlante Strings and Chars The char type (pronounced "car") represents a single character. A char literal value can be written in the code using single quotes
Certified PHP Developer VS-1054
Certified PHP Developer VS-1054 Certification Code VS-1054 Certified PHP Developer Vskills certification for PHP Developers assesses the candidate for developing PHP based applications. The certification
Exercise 4 Learning Python language fundamentals
Exercise 4 Learning Python language fundamentals Work with numbers Python can be used as a powerful calculator. Practicing math calculations in Python will help you not only perform these tasks, but also
Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl
First CGI Script and Perl Perl in a nutshell Prof. Rasley shebang line tells the operating system where the Perl interpreter is located necessary on UNIX comment line ignored by the Perl interpreter End
Developing Web Views for VMware vcenter Orchestrator
Developing Web Views for VMware vcenter Orchestrator vcenter Orchestrator 5.1 This document supports the version of each product listed and supports all subsequent versions until the document is replaced
Course Outline Basic Web Development
Course Outline Basic Web Development For Professionals Who Can Participate? Anyone can join who has the interest to get into the creative web development profession. Prerequisite: Technical Skill: Must
Chapter 2: Elements of Java
Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction
Web Development using PHP (WD_PHP) Duration 1.5 months
Duration 1.5 months Our program is a practical knowledge oriented program aimed at learning the techniques of web development using PHP, HTML, CSS & JavaScript. It has some unique features which are as
Outline Basic concepts of Python language
Data structures: lists, tuples, sets, dictionaries Basic data types Examples: int: 12, 0, -2 float: 1.02, -2.4e2, 1.5e-3 complex: 3+4j bool: True, False string: "Test string" Conversion between types int(-2.8)
Tutorial básico del método AJAX con PHP y MySQL
1 de 14 02/06/2006 16:10 Tutorial básico del método AJAX con PHP y MySQL The XMLHttpRequest object is a handy dandy JavaScript object that offers a convenient way for webpages to get information from servers
CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals
CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals 1 Recall From Last Time: Java Program import java.util.scanner; public class EggBasket { public static void main(string[]
java Features Version April 19, 2013 by Thorsten Kracht
java Features Version April 19, 2013 by Thorsten Kracht Contents 1 Introduction 2 1.1 Hello World................................................ 2 2 Variables, Types 3 3 Input/Output 4 3.1 Standard I/O................................................
Microsoft Windows PowerShell v2 For Administrators
Course 50414B: Microsoft Windows PowerShell v2 For Administrators Course Details Course Outline Module 1: Introduction to PowerShell the Basics This module explains how to install and configure PowerShell.
Web Hosting Features. Small Office Premium. Small Office. Basic Premium. Enterprise. Basic. General
General Basic Basic Small Office Small Office Enterprise Enterprise RAID Web Storage 200 MB 1.5 MB 3 GB 6 GB 12 GB 42 GB Web Transfer Limit 36 GB 192 GB 288 GB 480 GB 960 GB 1200 GB Mail boxes 0 23 30
Install Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html
CS 259: Data Structures with Java Hello World with the IntelliJ IDE Instructor: Joel Castellanos e-mail: joel.unm.edu Web: http://cs.unm.edu/~joel/ Office: Farris Engineering Center 319 8/19/2015 Install
Client-side Development using HTML, Javascript and CSS
Lab 1 Client-side Development using HTML, Javascript and CSS Authors: Sahand Sdjadee Alexander Kazen Gustav Bylund Per Jonsson Tobias Jansson Spring 2015 TDDD97 Web Programming http://www.ida.liu.se/~tddd97/
CrownPeak Playbook CrownPeak Hosting with PHP
CrownPeak Playbook CrownPeak Hosting with PHP Version 1.0 2014, Inc. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical,
Introduction to Java Lecture Notes. Ryan Dougherty [email protected]
1 Introduction to Java Lecture Notes Ryan Dougherty [email protected] Table of Contents 1 Versions....................................................................... 2 2 Introduction...................................................................
Moving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
PHP Authentication Schemes
7 PHP Authentication Schemes IN THIS CHAPTER Overview Generating Passwords Authenticating User Against Text Files Authenticating Users by IP Address Authenticating Users Using HTTP Authentication Authenticating
Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C
Basic Java Constructs and Data Types Nuts and Bolts Looking into Specific Differences and Enhancements in Java compared to C 1 Contents Hello World Program Statements Explained Java Program Structure in
Computational Mathematics with Python
Boolean Arrays Classes Computational Mathematics with Python Basics Olivier Verdier and Claus Führer 2009-03-24 Olivier Verdier and Claus Führer Computational Mathematics with Python 2009-03-24 1 / 40
Specialized Programme on Web Application Development using Open Source Tools
Specialized Programme on Web Application Development using Open Source Tools A. NAME OF INSTITUTE Centre For Development of Advanced Computing B. NAME/TITLE OF THE COURSE C. COURSE DATES WITH DURATION
CSCI110: Examination information.
CSCI110: Examination information. The exam for CSCI110 will consist of short answer questions. Most of them will require a couple of sentences of explanation of a concept covered in lectures or practical
Introduction to CloudScript
Introduction to CloudScript A NephoScale Whitepaper Authors: Nick Peterson, Alan Meadows Date: 2012-07-06 CloudScript is a build language for the cloud. It is a simple Domain Specific Language (DSL) that
Web Development with Flask and the Raspberry Pi Leading by Example CUAUHTEMOC CARBAJAL ITESM CEM 22/04/2014
Web Development with Flask and the Raspberry Pi Leading by Example CUAUHTEMOC CARBAJAL ITESM CEM 22/04/2014 Introduction Flask: lightweight web application framework written in Python and based on the
G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.
SQL databases An introduction AMP: Apache, mysql, PHP This installations installs the Apache webserver, the PHP scripting language, and the mysql database on your computer: Apache: runs in the background
Java Application Developer Certificate Program Competencies
Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle
DIPLOMA IN WEBDEVELOPMENT
DIPLOMA IN WEBDEVELOPMENT Prerequisite skills Basic programming knowledge on C Language or Core Java is must. # Module 1 Basics and introduction to HTML Basic HTML training. Different HTML elements, tags
Building a Multi-Threaded Web Server
Building a Multi-Threaded Web Server In this lab we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous
XML Processing and Web Services. Chapter 17
XML Processing and Web Services Chapter 17 Textbook to be published by Pearson Ed 2015 in early Pearson 2014 Fundamentals of http://www.funwebdev.com Web Development Objectives 1 XML Overview 2 XML Processing
IE Class Web Design Curriculum
Course Outline Web Technologies 130.279 IE Class Web Design Curriculum Unit 1: Foundations s The Foundation lessons will provide students with a general understanding of computers, how the internet works,
CSE 403. Performance Profiling Marty Stepp
CSE 403 Performance Profiling Marty Stepp 1 How can we optimize it? public static String makestring() { String str = ""; for (int n = 0; n < REPS; n++) { str += "more"; } return str; } 2 How can we optimize
Tableau Server Trusted Authentication
Tableau Server Trusted Authentication When you embed Tableau Server views into webpages, everyone who visits the page must be a licensed user on Tableau Server. When users visit the page they will be prompted
Tableau Server Trusted Authentication
Tableau Server Trusted Authentication When you embed Tableau Server views into webpages, everyone who visits the page must be a licensed user on Tableau Server. When users visit the page they will be prompted
MPP Manager Users Guide
MPP Manager Users Guide Spam Quarantine and Email Archive Administration \ August, 2008 MPP Mable of Contents 1 About This Guide 4 1.1 MPP Manager Overview 4 1.2 Other Documentation 4 2 Mppserver MPP Manager
Finding XSS in Real World
Finding XSS in Real World by Alexander Korznikov [email protected] 1 April 2015 Hi there, in this tutorial, I will try to explain how to find XSS in real world, using some interesting techniques. All
Portal Connector Fields and Widgets Technical Documentation
Portal Connector Fields and Widgets Technical Documentation 1 Form Fields 1.1 Content 1.1.1 CRM Form Configuration The CRM Form Configuration manages all the fields on the form and defines how the fields
Government Girls Polytechnic, Bilaspur
Government Girls Polytechnic, Bilaspur Name of the Lab: Internet & Web Technology Lab Title of the Practical : Dynamic Web Page Design Lab Class: CSE 6 th Semester Teachers Assessment:20 End Semester Examination:50
Introduction to Web Technologies
Introduction to Web Technologies Tara Murphy 17th February, 2011 The Internet CGI Web services HTML and CSS 2 The Internet is a network of networks ˆ The Internet is the descendant of ARPANET (Advanced
Dreamweaver CS5. Module 2: Website Modification
Dreamweaver CS5 Module 2: Website Modification Dreamweaver CS5 Module 2: Website Modification Last revised: October 31, 2010 Copyrights and Trademarks 2010 Nishikai Consulting, Helen Nishikai Oakland,
Content Management System
Content Management System XT-CMS INSTALL GUIDE Requirements The cms runs on PHP so the host/server it is intended to be run on should ideally be linux based with PHP 4.3 or above. A fresh install requires
Basic Programming and PC Skills: Basic Programming and PC Skills:
Texas University Interscholastic League Contest Event: Computer Science The contest challenges high school students to gain an understanding of the significance of computation as well as the details of
Computer Programming I
Computer Programming I COP 2210 Syllabus Spring Semester 2012 Instructor: Greg Shaw Office: ECS 313 (Engineering and Computer Science Bldg) Office Hours: Tuesday: 2:50 4:50, 7:45 8:30 Thursday: 2:50 4:50,
Other Language Types CMSC 330: Organization of Programming Languages
Other Language Types CMSC 330: Organization of Programming Languages Markup and Query Languages Markup languages Set of annotations to text Query languages Make queries to databases & information systems
FileMaker Server 12. Custom Web Publishing with PHP
FileMaker Server 12 Custom Web Publishing with PHP 2007 2012 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks
LABORATORY 117. Intorduction to VoiceXML (2)
LABORATORY 117 Intorduction to VoiceXML (2) 1 TAC2000/2000 Main Topics Declearing variable and reteieving values Variable scopes Branching elements Math functions in JavaScript 2 TAC2000/2000 Variables
AP Computer Science Java Subset
APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall
Computational Mathematics with Python
Computational Mathematics with Python Basics Claus Führer, Jan Erik Solem, Olivier Verdier Spring 2010 Claus Führer, Jan Erik Solem, Olivier Verdier Computational Mathematics with Python Spring 2010 1
PHP Integration Kit. Version 2.5.1. User Guide
PHP Integration Kit Version 2.5.1 User Guide 2012 Ping Identity Corporation. All rights reserved. PingFederate PHP Integration Kit User Guide Version 2.5.1 December, 2012 Ping Identity Corporation 1001
Introduction to Python
WEEK ONE Introduction to Python Python is such a simple language to learn that we can throw away the manual and start with an example. Traditionally, the first program to write in any programming language
Form Validation. Server-side Web Development and Programming. What to Validate. Error Prevention. Lecture 7: Input Validation and Error Handling
Form Validation Server-side Web Development and Programming Lecture 7: Input Validation and Error Handling Detecting user error Invalid form information Inconsistencies of forms to other entities Enter
Lesson 7 - Website Administration
Lesson 7 - Website Administration If you are hired as a web designer, your client will most likely expect you do more than just create their website. They will expect you to also know how to get their
4.2 Understand Microsoft ASP.NET Web Application Development
L E S S O N 4 4.1 Understand Web Page Development 4.2 Understand Microsoft ASP.NET Web Application Development 4.3 Understand Web Hosting 4.4 Understand Web Services MTA Software Fundamentals 4 Test L
Introduction... 1. Connecting Via FTP... 4. Where do I upload my website?... 4. What to call your home page?... 5. Troubleshooting FTP...
This guide is designed to show you the different ways of uploading your site using ftp, including the basic principles of understanding and troubleshooting ftp issues. P a g e 0 Introduction... 1 When
FileMaker Server 13. Custom Web Publishing with PHP
FileMaker Server 13 Custom Web Publishing with PHP 2007 2013 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks
DESIGNING HTML HELPERS TO OPTIMIZE WEB APPLICATION DEVELOPMENT
Abstract DESIGNING HTML HELPERS TO OPTIMIZE WEB APPLICATION DEVELOPMENT Dragos-Paul Pop 1 Building a web application or a website can become difficult, just because so many technologies are involved. Generally
PL/SQL Overview. Basic Structure and Syntax of PL/SQL
PL/SQL Overview PL/SQL is Procedural Language extension to SQL. It is loosely based on Ada (a variant of Pascal developed for the US Dept of Defense). PL/SQL was first released in ١٩٩٢ as an optional extension
Script Handbook for Interactive Scientific Website Building
Script Handbook for Interactive Scientific Website Building Version: 173205 Released: March 25, 2014 Chung-Lin Shan Contents 1 Basic Structures 1 11 Preparation 2 12 form 4 13 switch for the further step
Project 2: Web Security Pitfalls
EECS 388 September 19, 2014 Intro to Computer Security Project 2: Web Security Pitfalls Project 2: Web Security Pitfalls This project is due on Thursday, October 9 at 6 p.m. and counts for 8% of your course
