Skip to content
UoL CS Notes

Home

This website houses notes from my studies at the University of Liverpool. If you see any errors or issues, please do open an issue on this site's GitHub.

Java E-mail Sender

COMP211 Tutorials

In order to establish a TCP connection and send commands to a server you can use the following skeleton code: import java.io.*; import java.net.*; public class EmailSender { public static void main(String[] args) throws Exception { // Establish a TCP connection with the mail server. Socket socket = new Socket("35.246.112.180",1025);...

Read More

Tutorial 1

COMP207 Tutorials

This tutorial is focused on the tutorial 1 exercises which can be found here. Part 1 Schemas: Students(first_name, last_name, birthday, s_id) Enrolments(s_id, course_code, year) Students - 4 columns by 5 rows Enrolments - 3 columns by 9 rows Creating tables: CREATE TABLE Students { first_name VARCHAR(20), last_name VARCHAR(20), birthday DATE,...

Read More

Java Recap

COMP201 Tutorials

This tutorial had the aim of recaping the various features of Java. You should revise the built in methods and classes from the Java package and also recap use of Thread. Final Final Classes - Cannot be extended. Final Methods - Cannot be overridden. Final Reference Variable & Fields -...

Read More

Definition of Regular Expressions

COMP218 Lectures

String Concatenation This is the product of two words. It is obtained by appending them together to form one long word. s = abb t = bab st = abbbab ts = bababb It is non-commutative. These strings can be defined formally: \[s=x_1\ldots x_n , t=y_1\ldots y_m\] \[st=x_1\ldots x_ny_1\ldots y_m\]...

Read More

$\epsilon$-NFA to NFA Conversion

COMP218 Lectures

In this lecture we will be doing step 1 from the previous lecture NFA to DFA Conversion (Determinisation). Eliminating $\epsilon$-Transitions Consider the following $\epsilon$-NFA: stateDiagram-v2 direction LR [*] --> q0 q0 --> q1:Epsilon, 1 q1 --> q2:Epsilon q1 --> q1:0 q1 --> q0:0 q2:q2 To convert this to an NFA...

Read More

The Application Layer - Transport Services

COMP211 Lectures

Service Requirements Data Integrity You may need 100% reliable data transfer for some types of data transfer. Media streaming can often compensate for loss. Timing Some apps require low latency for effective use of the application. Throughput Media streaming often requires a minimum throughput to be effective. Security Data encryption...

Read More

The Application Layer - Architectures & Processes

COMP211 Lectures

Network Applications These are programs that: Run on different end systems. Communicate over the network. As this is a layered system there is no need to write software for the network-core devices. Client-Server Architecture The server is: Always on host. Permanent IP address. Can use data centres for scaling. The...

Read More

UNION

COMP207 Lectures

This is basically the same as in mathematical sets. Consider the following table: birtday first_name family_name e_id 1990-11-10 Anne Smith 1 2000-02-05 David Jones 2 2995-05-09 William Taylor 3 Executing the following query would give the following table: SELECT first_name AS name FROM Employees UNION SELECT family_name FROM Employees; name...

Read More

SQL Queries (Optional Part)

COMP207 Lectures

These aren’t required to form a valid query and are extensions to standard queries. SQL queries have the following form: SELECT [] FROM [] WHERE [] GROUP BY [] HAVING [] ORDER BY [] The first two parts are required to have a valid query. WHERE This is already mostly...

Read More

Requirements Engineering Process

COMP201 Lectures

This lecture is very similar to COMP107 - Requirement Elicitation. The enginerring process goes as follows: Requirement elicitation - What services does the end-user require? Requirements analysis - How to we classify, prioritise and negotiate requirements? Requirements validation - Does the proposed system do what the users require? Requirements management...

Read More