Web Interfaces. the web server Apache processing forms with Python scripts Python code to write HTML

Size: px
Start display at page:

Download "Web Interfaces. the web server Apache processing forms with Python scripts Python code to write HTML"

Transcription

1 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm MCS 507 Lecture 27 Mathematical, Statistical and Scientific Software Jan Verschelde, 29 October 2012 Scientific Software (MCS 507) web interfaces 29 October / 41

2 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

3 the web server Apache Apache is an open source web server, OS independent. Although named in honor of the Native American tribe, Apache makes a cute pun on a patchy web server with web site at Python often processes web forms we can call Python scripts from a browser give our programs a web interface make software available via the web. localhost = Scientific Software (MCS 507) web interfaces 29 October / 41

4 Running Apache We will demonstrate on a Mac OS X Apache is already installed, verify launching a browser with as address. 2 Select Sharing from the System Preferences and check Web Sharing to allow users of other computers to view webpages on this computer. 3 Instead of public_html, the Sites directory is where Mac users store their web pages. 4 Instead of /var/www/cgi-bin, CGI scripts are in /Library/WebServer/CGI-Executables. CGI = Common Gateway Interface, is set of protocols through which applications interact with web servers. Scientific Software (MCS 507) web interfaces 29 October / 41

5 Python works The script python_works.py contains 3 lines: #!/usr/bin/python print "Content-Type: text/plain\n\n" print "Python works" and is in /Library/WebServer/CGI-Executables. Scientific Software (MCS 507) web interfaces 29 October / 41

6 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

7 showing a form The HTML in show_form.html brings The word hello is entered by the user. Pressing submit activates a Python script. Scientific Software (MCS 507) web interfaces 29 October / 41

8 processing a form Pressing submit brings up a new web page. The script process_form.py gets the word and prints one line into the browser window. Scientific Software (MCS 507) web interfaces 29 October / 41

9 code in show_form.html <html> <head> <title> MCS 507 Lec 27: show a form </title> </head> <body> <form action= " <b>enter a word:</b> <input type="text" name="word" size ="10"> <input type="submit" value="submit word"> </form> </body> </html> Scientific Software (MCS 507) web interfaces 29 October / 41

10 code in process_form.py #!/usr/bin/python import cgi form = cgi.fieldstorage() print "Content-Type: text/plain\n" try: w = form[ word ].value s = your word is s = s + \" + w + \" print s except KeyError: print "please enter a word" Scientific Software (MCS 507) web interfaces 29 October / 41

11 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

12 forms in Python scripts writing HTML What we did before: 1 Form element in HTML page triggers action. 2 Action triggered by submit button is defined by a Python script. Advantage/disadvantage: + Separate HTML layout and actions. Submit brings up a new page each time. Scientific Software (MCS 507) web interfaces 29 October / 41

13 showing & processing forms At first, the script show_process_form.py shows Then the user fills in hello and submits. Scientific Software (MCS 507) web interfaces 29 October / 41

14 after submit Scientific Software (MCS 507) web interfaces 29 October / 41

15 printing a header #!/usr/bin/python import cgi def PrintHeader(title): """ writes title and header of page """ print """Content-type: text/html <html> <head> <title>%s</title> </head> <body>""" % title PrintHeader("MCS 507 Lec27: forms") Scientific Software (MCS 507) web interfaces 29 October / 41

16 printing a form The script show_process_form.py continues: print """ <form method = "post" method = "show_process_form.py"> <b>enter a word:</b> <input type = "text" name = "word"> <input type = "submit" value = "submit word"> </form>""" form = cgi.fieldstorage() if form.has_key("word"): print """<p>your word is <em>%s</em></p> """ % form["word"].value print "</body></html>\n" Scientific Software (MCS 507) web interfaces 29 October / 41

17 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

18 prompting for a dimension The default value is set at 2. After the user changes it to 3, and hits submit... Scientific Software (MCS 507) web interfaces 29 October / 41

19 prompting for a matrix Scientific Software (MCS 507) web interfaces 29 October / 41

20 filling in values Scientific Software (MCS 507) web interfaces 29 October / 41

21 computing the determinant Scientific Software (MCS 507) web interfaces 29 October / 41

22 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

23 script for web determinant The script is a sequence of two forms: 1 we ask for the dimension of the matrix The dimension is then used to generate a table of input elements to give the entries of the matrix. 2 we ask for the entries of the matrix The second form is processed by the same script. The action of this form brings up a new page with the matrix and the determinant. The dimension is passed from one form to the other through an input element. Scientific Software (MCS 507) web interfaces 29 October / 41

24 main() in web_det.py def main(): """ Web interface to compute a determinant. """ PrintHeader("compute determinant") form = cgi.fieldstorage() if not form.has_key("dim"): AskDimension() else: n = int(form["dim"].value) AskMatrix(n) print "</body></html>\n" Scientific Software (MCS 507) web interfaces 29 October / 41

25 default values def AskDimension(): """ form to enter the dimension """ print """<form method = "post" action = "web_det.py"> <p> Give dimension: <input type = "text" name = "dim" size = 4 value = 2> <input type = "submit"> </p> </form>""" Scientific Software (MCS 507) web interfaces 29 October / 41

26 asking for a matrix def AskMatrix(n): """ form to enter an n-by-n matrix """ print """<form method = "post" action = "compute_det.py">""" print """The dimension: <input type = "text" name = "dim" size = 4 value = %d>""" % n print "<p>enter matrix :</p>" Scientific Software (MCS 507) web interfaces 29 October / 41

27 a table in a form print "<table>" for i in range(0,n): print "<tr>" for j in range(0,n): print """<td><input type = "text" name = %d,%d size = 4></td>""" % (i,j) print "</table>" print """<input type = "submit">""" print "</form>" The name of each input element is (i,j). Scientific Software (MCS 507) web interfaces 29 October / 41

28 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

29 the script compute_det.py from numpy import matrix, zeros from numpy.linalg import det def Determinant(form,n): """ returns the determinant of the matrix available in the form """ A = zeros((n,n),float) for i in range(0,n): for j in range(0,n): info = "%d,%d" % (i,j) if form.has_key(info): A[i,j] = float(form[info].value) print "The matrix is" print A return det(a) Scientific Software (MCS 507) web interfaces 29 October / 41

30 the main function def main(): """ Web interface to compute a determinant. """ print "Content-type: text/plain\n" form = cgi.fieldstorage() if form.has_key("dim"): n = int(form["dim"].value) d = Determinant(form,n) print "The determinant :", d main() Scientific Software (MCS 507) web interfaces 29 October / 41

31 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

32 Personalized Web Browsing Storing information about a client: 1 previous selections made passing data from one script to another 2 personal information identification and passwords 3 information from previous visits counting number of visits Potential applications: 1 customize displayed content 2 store encrypted password for fast access 3 personalized pricing... Scientific Software (MCS 507) web interfaces 29 October / 41

33 storing information about client Cookies are data stored by web server on client computer, managed by the browser. Using the Cookie module: >>> import Cookie >>> c = Cookie.SmartCookie() >>> c[ L ] = 27 >>> c[ date ] = Mon 29 Oct 2012 >>> print c Set-Cookie: L=27 Set-Cookie: date="mon 29 Oct 2012" Cookies are objects like dictionaries. Scientific Software (MCS 507) web interfaces 29 October / 41

34 Using Cookies Count number of times browser visited. Write a script to 1 retrieve cookie, initialize counter to zero, 2 or increment the value of counter by one, 3 and display counter value on the page. Script is cookie_counter.py. 1 in /Library/WebServer/CGI-Executables, 2 browser settings must accept cookies. Note: each browser has its own cookies. Scientific Software (MCS 507) web interfaces 29 October / 41

35 Running cookie_counter.py Scientific Software (MCS 507) web interfaces 29 October / 41

36 code for main() #!/Library/Frameworks/.../bin/python import Cookie, os def GetCookie(): """ Retrieves cookie, either initializes counter, or increments the counter by one. """ def main(): """ Retrieves a cookie and writes the value of counter to the page. """ c = GetCookie() print c print "Content-Type: text/plain\n" print "counter: %d" % c[ counter ].value Scientific Software (MCS 507) web interfaces 29 October / 41

37 code for GetCookie() def GetCookie(): """ Retrieves cookie, either initializes counter, or increments the counter by one. """ if os.environ.has_key( HTTP_COOKIE ): c = Cookie.Cookie(os.environ[ HTTP_COOKIE ]) else: c = Cookie.Cookie() if not c.has_key( counter ): c[ counter ] = 0 else: c[ counter ] = c[ counter ].value + 1 return c Scientific Software (MCS 507) web interfaces 29 October / 41

38 Web Interfaces 1 Python Scripts in Browsers the web server Apache processing forms with Python scripts Python code to write HTML 2 Web Interfaces for the Determinant dynamic interactive forms passing data between forms computing the determinant 3 Cookies storing information about a client encryption with secure hash algorithm Scientific Software (MCS 507) web interfaces 29 October / 41

39 secure hash algorithm We can use cookies for login names and passwords. If passwords are unencrypted, then insecure. Secure hash algorithm: 1 computationally infeasible to compute inverse is trapdoor function 2 very low collision rate very low chance that two different messages will generate the same key Server encrypts password before sending to client. Authentication by comparing encrypted passwords. Scientific Software (MCS 507) web interfaces 29 October / 41

40 using the hashlib module >>> message = this is me >>> import hashlib >>> h = hashlib.sha256() >>> h <sha256 HASH 0x7fede9bc5228> >>> h.update(message) >>> h.hexdigest() dd81cb79f11bedd77be0000f28e264e2c4b42376c76b891c7845b Scientific Software (MCS 507) web interfaces 29 October / 41

41 Summary + Exercises Apache and Python are the A and P in LAMP. 0 Verify that Apache runs on your computer. 1 Write a web interface to compute the greatest common divisor of two user given numbers. 2 Make an HTML form that prompts the user to enter a polynomial with integer coefficients in the variable x. The action in the form calls a script that uses SymPy to extract the vector of coefficients and the degree. 3 Extend the previous exercise to make a web interface for MPSolve (see Lecture 13). Homework due Friday 16 November at 10AM: exercises 1 and 3 of lecture 21; exercise 1 of lecture 22; exercise 2 of lecture 23; exercises 2 and 4 of lecture 24; exercises 1 and 2 of lecture 25; exercises 1 and 3 of lecture 26. Scientific Software (MCS 507) web interfaces 29 October / 41

Advanced CGI Scripts. personalized web browsing using cookies: count number of visits. secure hash algorithm using cookies for login data the scripts

Advanced CGI Scripts. personalized web browsing using cookies: count number of visits. secure hash algorithm using cookies for login data the scripts Advanced CGI Scripts 1 Cookies personalized web browsing using cookies: count number of visits 2 Password Encryption secure hash algorithm using cookies for login data the scripts 3 Authentication via

More information

Web Interfaces for Database Servers

Web Interfaces for Database Servers Web Interfaces for Database Servers 1 CGI, MySQLdb, and Sockets glueing the connections with Python functions of the server: connect, count, and main development of the code for the client 2 Displaying

More information

Outline. evolution of the web IP addresses and URLs client/server and HTTP. HTML, XML, MathML MathML generated by Maple. the weather forecast

Outline. evolution of the web IP addresses and URLs client/server and HTTP. HTML, XML, MathML MathML generated by Maple. the weather forecast Outline 1 Internet Basics evolution of the web IP addresses and URLs client/server and HTTP 2 Markup Languages HTML, XML, MathML MathML generated by Maple 3 Retrieving Data the weather forecast 4 CGI Programming

More information

NETB 329 Lecture 13 Python CGI Programming

NETB 329 Lecture 13 Python CGI Programming NETB 329 Lecture 13 Python CGI Programming 1 of 83 What is CGI? The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom

More information

Web Clients and Crawlers

Web Clients and Crawlers Web Clients and Crawlers 1 Web Clients alternatives to web browsers opening a web page and copying its content 2 Scanning Files looking for strings between double quotes parsing URLs for the server location

More information

Root Finding Methods. sympy and Sage. MCS 507 Lecture 13 Mathematical, Statistical and Scientific Software Jan Verschelde, 21 September 2011

Root Finding Methods. sympy and Sage. MCS 507 Lecture 13 Mathematical, Statistical and Scientific Software Jan Verschelde, 21 September 2011 wrap Root Finding Methods 1 2 wrap MCS 507 Lecture 13 Mathematical, Statistical and Scientific Software Jan Verschelde, 21 September 2011 Root Finding Methods 1 wrap 2 wrap wrap octave-3.4.0:1> p = [1,0,2,-1]

More information

Random Walks & Cellular Automata

Random Walks & Cellular Automata Random Walks & Cellular Automata 1 Particle Movements basic version of the simulation vectorized implementation 2 Cellular Automata pictures of matrices an animation of matrix plots the game of life of

More information

LING 408/508: Computational Techniques for Linguists. Lecture 20

LING 408/508: Computational Techniques for Linguists. Lecture 20 LING 408/508: Computational Techniques for Linguists Lecture 20 Today's Topic Did everyone get their webserver (OS X or Ubuntu or both) up and running? Apache2 Last time: we configured the root site http://localhost/

More information

User Interfaces. MCS 507 Lecture 11 Mathematical, Statistical and Scientific Software Jan Verschelde, 16 September Command Line Interfaces

User Interfaces. MCS 507 Lecture 11 Mathematical, Statistical and Scientific Software Jan Verschelde, 16 September Command Line Interfaces User 1 2 MCS 507 Lecture 11 Mathematical, Statistical and Scientific Software Jan Verschelde, 16 September 2011 User 1 2 command line interfaces Many programs run without dialogue with user, as $ executable

More information

Random Walks & Cellular Automata

Random Walks & Cellular Automata Random Walks & Cellular Automata 1 Particle Movements basic version of the simulation vectorized implementation 2 Cellular Automata pictures of matrices an animation of matrix plots the game of life of

More information

solving polynomial systems in the cloud with phc

solving polynomial systems in the cloud with phc solving polynomial systems in the cloud with phc Jan Verschelde University of Illinois at Chicago Department of Mathematics, Statistics, and Computer Science http://www.math.uic.edu/ jan jan@math.uic.edu

More information

processing data with a database

processing data with a database processing data with a database 1 MySQL and MySQLdb MySQL: an open source database running MySQL for database creation MySQLdb: an interface to MySQL for Python 2 CTA Tables in MySQL files in GTFS feed

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 8 HTML Forms and Basic CGI Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you will

More information

Web forms and CGI scripts

Web forms and CGI scripts Web forms and CGI scripts Dr. Andrew C.R. Martin andrew.martin@ucl.ac.uk http://www.bioinf.org.uk/ Aims and objectives Understand how the web works Be able to create forms on HTML pages Understand how

More information

Lists and Loops. browse Python docs and interactive help

Lists and Loops. browse Python docs and interactive help Lists and Loops 1 Help in Python browse Python docs and interactive help 2 Lists in Python defining lists lists as queues and stacks inserting and removing membership and ordering lists 3 Loops in Python

More information

Welcome to MCS 275. Course Content Prerequisites & Expectations. Scripting in Python from OOP to LAMP example: Factorization in Primes

Welcome to MCS 275. Course Content Prerequisites & Expectations. Scripting in Python from OOP to LAMP example: Factorization in Primes Welcome to MCS 275 1 About the Course Course Content Prerequisites & Expectations 2 Introduction to Programming Scripting in Python from OOP to LAMP example: Factorization in Primes 3 Summary MCS 275 Lecture

More information

PHCpack, phcpy, and Sphinx

PHCpack, phcpy, and Sphinx PHCpack, phcpy, and Sphinx 1 the software PHCpack a package for Polynomial Homotopy Continuation polyhedral homotopies the Python interface phcpy 2 Documenting Software with Sphinx Sphinx generates documentation

More information

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University 1 Objectives You will learn about Server-side web programming in Python Common Gateway Interface

More information

List Comprehensions and Simulations

List Comprehensions and Simulations List Comprehensions and Simulations 1 List Comprehensions examples in the Python shell zipping, filtering, and reducing 2 Monte Carlo Simulations testing the normal distribution the Mean Time Between Failures

More information

Numerical Integration

Numerical Integration Numerical Integration 1 Functions using Functions functions as arguments of other functions the one-line if-else statement functions returning multiple values 2 Constructing Integration Rules with sympy

More information

Branching and Enumeration

Branching and Enumeration Branching and Enumeration 1 Booleans and Branching computing logical expressions computing truth tables with Sage if, else, and elif 2 Timing Python Code try-except costs more than if-else 3 Recursive

More information

CS1 Lecture 2 Jan. 16, 2019

CS1 Lecture 2 Jan. 16, 2019 CS1 Lecture 2 Jan. 16, 2019 Contacting me/tas by email You may send questions/comments to me/tas by email. For discussion section issues, sent to TA and me For homework or other issues send to me (your

More information

Running Cython. overview hello world with Cython. experimental setup adding type declarations cdef functions & calling external functions

Running Cython. overview hello world with Cython. experimental setup adding type declarations cdef functions & calling external functions Running Cython 1 Getting Started with Cython overview hello world with Cython 2 Numerical Integration experimental setup adding type declarations cdef functions & calling external functions 3 Using Cython

More information

COMP519 Web Programming Autumn CGI Programming

COMP519 Web Programming Autumn CGI Programming COMP519 Web Programming Autumn 2015 CGI Programming CGI Programming These lectures notes are designed to: Teach you how to use CGI in server-side programming Use environmental variables in Python Access

More information

Advanced Web Programming

Advanced Web Programming Advanced Web Programming 1 Advanced Web Programming what we have covered so far 2 The SocketServer Module simplified development of network servers a server tells clients the time 3 A Forking Server instead

More information

Tuples and Nested Lists

Tuples and Nested Lists stored in hash 1 2 stored in hash 3 and 4 MCS 507 Lecture 6 Mathematical, Statistical and Scientific Software Jan Verschelde, 2 September 2011 and stored in hash 1 2 stored in hash 3 4 stored in hash tuples

More information

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11 Attacks Against Websites Tom Chothia Computer Security, Lecture 11 A typical web set up TLS Server HTTP GET cookie Client HTML HTTP file HTML PHP process Display PHP SQL Typical Web Setup HTTP website:

More information

USQ/CSC2406 Web Publishing

USQ/CSC2406 Web Publishing USQ/CSC2406 Web Publishing Lecture 4: HTML Forms, Server & CGI Scripts Tralvex (Rex) Yeap 19 December 2002 Outline Quick Review on Lecture 3 Topic 7: HTML Forms Topic 8: Server & CGI Scripts Class Activity

More information

CMPSCI 120 Fall 2017 Lab #4 Professor William T. Verts

CMPSCI 120 Fall 2017 Lab #4 Professor William T. Verts CMPSCI 120 Fall 2017 Lab #4 Professor William T. Verts Logging in and Renaming Files As you did in the previous assignments, log in to the UNIX server. Change into the public_html directory and create

More information

Defining Functions. turning expressions into functions. writing a function definition defining and using modules

Defining Functions. turning expressions into functions. writing a function definition defining and using modules Defining Functions 1 Lambda Functions turning expressions into functions 2 Functions and Modules writing a function definition defining and using modules 3 Computing Series Developments exploring an example

More information

callback, iterators, and generators

callback, iterators, and generators callback, iterators, and generators 1 Adding a Callback Function a function for Newton s method a function of the user to process results 2 A Newton Iterator defining a counter class refactoring the Newton

More information

CGI Architecture Diagram. Web browser takes response from web server and displays either the received file or error message.

CGI Architecture Diagram. Web browser takes response from web server and displays either the received file or error message. What is CGI? The Common Gateway Interface (CGI) is a set of standards that define how information is exchanged between the web server and a custom script. is a standard for external gateway programs to

More information

COMP519 Web Programming Autumn CGI Programming

COMP519 Web Programming Autumn CGI Programming COMP519 Web Programming Autumn 2015 CGI Programming CGI Programming These lectures notes are designed to: Teach you how to use CGI in server-side programming Use environmental variables in Python Access

More information

Lists and Loops. defining lists lists as queues and stacks inserting and removing membership and ordering lists

Lists and Loops. defining lists lists as queues and stacks inserting and removing membership and ordering lists Lists and Loops 1 Lists in Python defining lists lists as queues and stacks inserting and removing membership and ordering lists 2 Loops in Python for and while loops the composite trapezoidal rule MCS

More information

COMP519 Practical 14 Python (5)

COMP519 Practical 14 Python (5) COMP519 Practical 14 Python (5) Introduction This practical contains further exercises that are intended to familiarise you with Python Programming. While you work through the tasks below compare your

More information

LING 408/508: Computational Techniques for Linguists. Lecture 21

LING 408/508: Computational Techniques for Linguists. Lecture 21 LING 408/508: Computational Techniques for Linguists Lecture 21 Administrivia Both Homework 7 and 8 have been graded Homework 9 today Example: example.cgi SiteSites$./example.cgi Content-Type: text/html;

More information

Introduction to Scientific Python, CME 193 Jan. 9, web.stanford.edu/~ermartin/teaching/cme193-winter15

Introduction to Scientific Python, CME 193 Jan. 9, web.stanford.edu/~ermartin/teaching/cme193-winter15 1 LECTURE 1: INTRO Introduction to Scientific Python, CME 193 Jan. 9, 2014 web.stanford.edu/~ermartin/teaching/cme193-winter15 Eileen Martin Some slides are from Sven Schmit s Fall 14 slides 2 Course Details

More information

AMS 200: Working on Linux/Unix Machines

AMS 200: Working on Linux/Unix Machines AMS 200, Oct 20, 2014 AMS 200: Working on Linux/Unix Machines Profs. Nic Brummell (brummell@soe.ucsc.edu) & Dongwook Lee (dlee79@ucsc.edu) Department of Applied Mathematics and Statistics University of

More information

PYTHON CGI PROGRAMMING

PYTHON CGI PROGRAMMING PYTHON CGI PROGRAMMING http://www.tutorialspoint.com/python/python_cgi_programming.htm Copyright tutorialspoint.com The Common Gateway Interface, or CGI, is a set of standards that define how information

More information

SETUP FOR OUTLOOK (Updated October, 2018)

SETUP FOR OUTLOOK (Updated October, 2018) EMAIL SETUP FOR OUTLOOK (Updated October, 2018) This tutorial will show you how to set up your email in Outlook using IMAP or POP. It also explains how to configure Outlook for MAC. Click on your version

More information

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. c360 Solutions

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc.   c360 Solutions c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. www.c360.com c360 Solutions Contents Overview... 3 Web Connect Configuration... 4 Implementing Web Connect...

More information

Welcome to MCS 360. content expectations. using g++ input and output streams the namespace std. Euclid s algorithm the while and do-while statements

Welcome to MCS 360. content expectations. using g++ input and output streams the namespace std. Euclid s algorithm the while and do-while statements Welcome to MCS 360 1 About the Course content expectations 2 our first C++ program using g++ input and output streams the namespace std 3 Greatest Common Divisor Euclid s algorithm the while and do-while

More information

Pemrograman Jaringan Web Client Access PTIIK

Pemrograman Jaringan Web Client Access PTIIK Pemrograman Jaringan Web Client Access PTIIK - 2012 In This Chapter You'll learn how to : Download web pages Authenticate to a remote HTTP server Submit form data Handle errors Communicate with protocols

More information

Uniform Resource Locators (URL)

Uniform Resource Locators (URL) The World Wide Web Web Web site consists of simply of pages of text and images A web pages are render by a web browser Retrieving a webpage online: Client open a web browser on the local machine The web

More information

CP215 Application Design

CP215 Application Design CP215 Application Design Microsoft HoloLens developer preorder: $3,000 Tech News! Tech News! Microsoft HoloLens developer preorder: $3,000 Raspberry Pi 3 with Wi-Fi and Bluetooth built-in: $35 Hacker's

More information

turning expressions into functions symbolic substitution, series, and lambdify

turning expressions into functions symbolic substitution, series, and lambdify Defining Functions 1 Lambda Functions turning expressions into functions symbolic substitution, series, and lambdify 2 Functions and Modules writing a function definition defining and using modules where

More information

Remote Deposit Transition Guide

Remote Deposit Transition Guide Remote Deposit Transition Guide Important actions you will need to take to transition your Remote Deposit Capture Service: User must be an administrator on the computer before starting the transition guide

More information

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms Web-Based Information Systems Fall 2004 CMPUT 410: CGI and HTML Forms Dr. Osmar R. Zaïane University of Alberta Outline of Lecture 5 Introduction Poor Man s Animation Animation with Java Animation with

More information

Configuring Proxy Settings. STEP 1: (Gathering Proxy Information) Windows

Configuring Proxy Settings. STEP 1: (Gathering Proxy Information) Windows This guide is provided to Elluminate Live! users to assist them to make a successful connection to an Elluminate Live! session through a proxy firewall. In some cases settings discussed in this document

More information

phcpy: an API for PHCpack

phcpy: an API for PHCpack phcpy: an API for PHCpack Jan Verschelde University of Illinois at Chicago Department of Mathematics, Statistics, and Computer Science http://www.math.uic.edu/ jan jan@math.uic.edu Graduate Computational

More information

Attacks Against Websites 3 The OWASP Top 10. Tom Chothia Computer Security, Lecture 14

Attacks Against Websites 3 The OWASP Top 10. Tom Chothia Computer Security, Lecture 14 Attacks Against Websites 3 The OWASP Top 10 Tom Chothia Computer Security, Lecture 14 OWASP top 10. The Open Web Application Security Project Open public effort to improve web security: Many useful documents.

More information

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Web Security Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Topics Web Architecture Parameter Tampering Local File Inclusion SQL Injection XSS Web Architecture Web Request Structure Web Request Structure

More information

COMP519 Web Programming Lecture 28: PHP (Part 4) Handouts

COMP519 Web Programming Lecture 28: PHP (Part 4) Handouts COMP519 Web Programming Lecture 28: PHP (Part 4) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool Contents

More information

Web client programming

Web client programming Web client programming JavaScript/AJAX Web requests with JavaScript/AJAX Needed for reverse-engineering homework site Web request via jquery JavaScript library jquery.ajax({ 'type': 'GET', 'url': 'http://vulnerable/ajax.php',

More information

CGI Programming. What is "CGI"?

CGI Programming. What is CGI? CGI Programming What is "CGI"? Common Gateway Interface A means of running an executable program via the Web. CGI is not a Perl-specific concept. Almost any language can produce CGI programs even C++ (gasp!!)

More information

High Level Parallel Processing

High Level Parallel Processing High Level Parallel Processing 1 GPU computing with Maple enabling CUDA in Maple 15 stochastic processes and Markov chains 2 Multiprocessing in Python scripting in computational science the multiprocessing

More information

User Interfaces. getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy

User Interfaces. getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy User Interfaces 1 Command Line Interfaces getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy 2 Encapsulation by Object Oriented Programming

More information

Installation & Configuration Guide Version 3.1

Installation & Configuration Guide Version 3.1 ARPMiner Installation & Configuration Guide Version 3.1 Document Revision 2.2 https://www.kaplansoft.com/ ARPMiner is built by Yasin KAPLAN Read Readme.txt for last minute changes and updates which can

More information

Enterprise Knowledge Platform Adding the Login Form to Any Web Page

Enterprise Knowledge Platform Adding the Login Form to Any Web Page Enterprise Knowledge Platform Adding the Login Form to Any Web Page EKP Adding the Login Form to Any Web Page 21JAN03 2 Table of Contents 1. Introduction...4 Overview... 4 Requirements... 4 2. A Simple

More information

Faculty Web Page Management System. Help Getting Started

Faculty Web Page Management System. Help Getting Started Faculty Web Page Management System Help Getting Started 2 Table of Contents Faculty Web Page Management System...1 Help Getting Started...1 Table of Contents...2 Manage My Personal Information...3 Creating

More information

COSC 2206 Internet Tools. The HTTP Protocol

COSC 2206 Internet Tools. The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol http://www.w3.org/protocols/ What is TCP/IP? TCP: Transmission Control Protocol IP: Internet Protocol These network protocols provide a standard method for sending

More information

CSC309: Introduction to Web Programming. Lecture 8

CSC309: Introduction to Web Programming. Lecture 8 CSC309: Introduction to Web Programming Lecture 8 Wael Aboulsaadat Front Layer Web Browser HTTP Request Get http://abc.ca/index.html Web (HTTP) Server HTTP Response .. How

More information

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example. Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example. Sorry about these half rectangle shapes a Smartboard issue today. To

More information

goremote.carolinas.org

goremote.carolinas.org Detailed instructions for goremote.carolinas.org Section 1. Registering your account in the goremote portal To setup your access to goremote.carolinas.org, please follow these steps: Open a browser window

More information

differentiation techniques

differentiation techniques differentiation techniques 1 Callable Objects delayed execution of stored code 2 Numerical and Symbolic Differentiation numerical approximations for the derivative storing common code in a parent class

More information

Flask-Cors Documentation

Flask-Cors Documentation Flask-Cors Documentation Release 3.0.4 Cory Dolphin Apr 26, 2018 Contents 1 Installation 3 2 Usage 5 2.1 Simple Usage............................................... 5 3 Documentation 7 4 Troubleshooting

More information

Scientific Computing: Lecture 1

Scientific Computing: Lecture 1 Scientific Computing: Lecture 1 Introduction to course, syllabus, software Getting started Enthought Canopy, TextWrangler editor, python environment, ipython, unix shell Data structures in Python Integers,

More information

Graphical User Interfaces

Graphical User Interfaces to visualize Graphical User Interfaces 1 2 to visualize MCS 507 Lecture 12 Mathematical, Statistical and Scientific Software Jan Verschelde, 19 September 2011 Graphical User Interfaces to visualize 1 2

More information

operator overloading algorithmic differentiation the class DifferentialNumber operator overloading

operator overloading algorithmic differentiation the class DifferentialNumber operator overloading operator overloading 1 Computing with Differential Numbers algorithmic differentiation the class DifferentialNumber operator overloading 2 Computing with Double Doubles the class DoubleDouble defining

More information

Transport Level Security

Transport Level Security 2 Transport Level Security : Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 28 October 2013 css322y13s2l12, Steve/Courses/2013/s2/css322/lectures/transport.tex,

More information

CMPE 151: Network Administration. Servers

CMPE 151: Network Administration. Servers CMPE 151: Network Administration Servers Announcements Unix shell+emacs tutorial. Basic Servers Telnet/Finger FTP Web SSH NNTP Let s look at the underlying protocols. Client-Server Model Request Response

More information

Forms, CGI. Objectives

Forms, CGI. Objectives Forms, CGI Objectives The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms Common Gateway Interface (CGI) Later: Servlets Generation

More information

Connect to Wireless, certificate install and setup Citrix Receiver

Connect to Wireless, certificate install and setup Citrix Receiver Connect to Wireless, certificate install and setup Citrix Receiver This document explains how to connect to the Wireless Network and access applications using Citrix Receiver on a Bring Your Own Device

More information

Johns Hopkins

Johns Hopkins Wireless Configuration Guide: Windows Vista Additional hopkins wireless network instructions and requirements for Windows XP, Mac OS X, and Linux can be found at: http://www.it.jhu.edu/networking/wireless/

More information

Computer Security. 10r. Recitation assignment & concept review. Paul Krzyzanowski. Rutgers University. Spring 2018

Computer Security. 10r. Recitation assignment & concept review. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 10r. Recitation assignment & concept review Paul Krzyzanowski Rutgers University Spring 2018 April 3, 2018 CS 419 2018 Paul Krzyzanowski 1 1. What is a necessary condition for perfect

More information

Building a Web-based Health Promotion Database

Building a Web-based Health Promotion Database 6 th International Conference on Applied Informatics Eger, Hungary, January 27 31, 2004. Building a Web-based Health Promotion Database Ádám Rutkovszky University of Debrecen, Faculty of Economics Department

More information

Remote Access. Application Viewer User Guide

Remote Access. Application Viewer User Guide Remote Access Application Viewer User Guide Page Logging into Application Viewer... 3 Logging off Application Viewer... 9 Lost or stolen tokens... 9 Application Viewer User Guide October 11, 2011 2 of

More information

13. Databases on the Web

13. Databases on the Web 13. Databases on the Web Requirements for Web-DBMS Integration The ability to access valuable corporate data in a secure manner Support for session and application-based authentication The ability to interface

More information

lambda forms map(), reduce(), filter(), eval(), and apply() estimating π with list comprehensions

lambda forms map(), reduce(), filter(), eval(), and apply() estimating π with list comprehensions Outline 1 Guessing Secrets functions returning functions oracles and trapdoor functions 2 anonymous functions lambda forms map(), reduce(), filter(), eval(), and apply() estimating π with list comprehensions

More information

Page 1 of 18. Girl Guides Member Zone

Page 1 of 18. Girl Guides Member Zone Page 1 of 18 Girl Guides Member Zone Table of Contents Girl Guides Member Zone...1 Table of Contents...2 Connecting to Memberzone...3 Using Windows XP or Windows 2003...5 Using Windows 2000...6 Navigating

More information

Introduction to Programming (Python) (IPP) CGI Programming. $Date: 2010/11/25 09:18:11 $ IPP-15 1

Introduction to Programming (Python) (IPP) CGI Programming. $Date: 2010/11/25 09:18:11 $ IPP-15 1 Introduction to Programming (Python) (IPP) CGI Programming $Date: 2010/11/25 09:18:11 $ 1 Static web pages The simplest web-based interaction is when your browser (the client) gets sent a file encoded

More information

Outline. Lecture 8: CGI (Common Gateway Interface ) Common Gateway Interface (CGI) CGI Overview

Outline. Lecture 8: CGI (Common Gateway Interface ) Common Gateway Interface (CGI) CGI Overview Outline Lecture 8: CGI (Common Gateway Interface ) CGI Overview Between Client and Handler Between Web Server and Handler Wendy Liu CSC309F Fall 2007 1 2 Common Gateway Interface (CGI) CGI Overview http://www.oreilly.com/openbook/cgi/

More information

Installing and Configuring Worldox/Web Mobile

Installing and Configuring Worldox/Web Mobile Installing and Configuring Worldox/Web Mobile SETUP GUIDE v 1.1 Revised 6/16/2009 REVISION HISTORY Version Date Author Description 1.0 10/20/2008 Michael Devito Revised and expanded original draft document.

More information

Web Clients and Crawlers

Web Clients and Crawlers Web Clients and Crawlers 1 Web Clients alternatives to web browsers opening a web page and copying its content 2 Scanning files looking for strings between double quotes parsing URLs for the server location

More information

FIS Client Point Getting Started Guide

FIS Client Point Getting Started Guide FIS Client Point Getting Started Guide Table of Contents Introduction... 4 Key Features... 4 Client Point Recommended Settings... 4 Browser and Operating Systems... 4 PC and Browser Settings... 5 Screen

More information

User Directories. Overview, Pros and Cons

User Directories. Overview, Pros and Cons User Directories Overview, Pros and Cons Overview Secure ISMS can operate with one or more of the following user directories. Secure ISMS Users (ISMS) Internal users local to the Secure ISMS application

More information

Web, HTTP and Web Caching

Web, HTTP and Web Caching Web, HTTP and Web Caching 1 HTTP overview HTTP: hypertext transfer protocol Web s application layer protocol client/ model client: browser that requests, receives, displays Web objects : Web sends objects

More information

A Simple Course Management Website

A Simple Course Management Website A Simple Course Management Website A Senior Project Presented to The Faculty of the Computer Engineering Department California Polytechnic State University, San Luis Obispo In Partial Fulfillment Of the

More information

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser. Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible

More information

CS 112: Intro to Comp Prog

CS 112: Intro to Comp Prog CS 112: Intro to Comp Prog Importing modules Branching Loops Program Planning Arithmetic Program Lab Assignment #2 Upcoming Assignment #1 Solution CODE: # lab1.py # Student Name: John Noname # Assignment:

More information

BIDMC Multi-Factor Authentication Enrollment Guide Table of Contents

BIDMC Multi-Factor Authentication Enrollment Guide Table of Contents BIDMC Multi-Factor Authentication Enrollment Guide Table of Contents Definitions... 2 Summary... 2 BIDMC Multi-Factor Authentication Enrollment... 3 Common Multi-Factor Authentication Enrollment Issues...

More information

Writing Perl Programs using Control Structures Worked Examples

Writing Perl Programs using Control Structures Worked Examples Writing Perl Programs using Control Structures Worked Examples Louise Dennis October 27, 2004 These notes describe my attempts to do some Perl programming exercises using control structures and HTML Forms.

More information

Mac OS X Server Web Technologies Administration. For Version 10.3 or Later

Mac OS X Server Web Technologies Administration. For Version 10.3 or Later Mac OS X Server Web Technologies Administration For Version 10.3 or Later apple Apple Computer, Inc. 2003 Apple Computer, Inc. All rights reserved. The owner or authorized user of a valid copy of Mac OS

More information

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. Web Programming Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. 1 World-Wide Wide Web (Tim Berners-Lee & Cailliau 92)

More information

Scan Report Executive Summary. Part 2. Component Compliance Summary Component (IP Address, domain, etc.):

Scan Report Executive Summary. Part 2. Component Compliance Summary Component (IP Address, domain, etc.): Scan Report Executive Summary Part 1. Scan Information Scan Customer Company: Date scan was completed: Vin65 ASV Company: Comodo CA Limited 02/18/2018 Scan expiration date: 05/19/2018 Part 2. Component

More information

CS Computer Networks 1: Authentication

CS Computer Networks 1: Authentication CS 3251- Computer Networks 1: Authentication Professor Patrick Traynor 4/14/11 Lecture 25 Announcements Homework 3 is due next class. Submit via T-Square or in person. Project 3 has been graded. Scores

More information

Introduction to Perl 6 Documentation

Introduction to Perl 6 Documentation Introduction to Perl 6 Documentation Release 0.5.1 Suman Khanal and Ashish Khanal Oct 05, 2018 Contents 1 Introduction 3 2 Running Perl 6 notebook 5 2.1 Docker way................................................

More information

Connect to Wireless, certificate install and setup Citrix Receiver

Connect to Wireless, certificate install and setup Citrix Receiver Connect to Wireless, certificate install and setup Citrix Receiver This document explains how to connect to the Wireless Network, certificate and access applications using Citrix Receiver on a Bring Your

More information

Exercise 1 - Linear Least Squares

Exercise 1 - Linear Least Squares Exercise 1 - Linear Least Squares Outline Course information Hints for Python, plotting, etc. Recap: Linear Least Squares Problem set: Q1-2D data Q2-3D data Q3 - pen and paper Course information Final

More information

Windows Download & Installation

Windows Download & Installation BrokerMetrics / AgentMetrics Instructions for a New Installation Windows Download & Installation... 1 Macintosh Download & Installation... 6 Troubleshooting... 10 How to verify your installation... 11

More information