Notes, summaries, assignments, exams, and exercises for Computer science for University

Kerberos Protocol Authentication and Network Transmission Media Types

Computer science2.55 KB

Kerberos: Secure Network Authentication Protocol

Kerberos is a network authentication protocol that allows systems and users to prove their identity to each other before accessing resources, ensuring secure communication within a network. It is a trusted third-party system that verifies user identities without sending passwords directly across the network.

Key Components and Characteristics of Kerberos

Authentication Protocol Definition

Kerberos is a protocol, meaning it is a set of rules and procedures that govern how devices and users authenticate with each other.

Trusted Third Party (KDC)

Kerberos relies on a trusted third party, known as the Key Distribution Center (KDC), to manage authentication.

Single Sign-On (SSO) Implementation

Kerberos is...

Continue reading "Kerberos Protocol Authentication and Network Transmission Media Types" »

Clevo X170 Gaming Laptops: Comet Lake-S Power and Upgrades

Computer science2.63 KB

Fresh leaks from the Chinese forum Saraba1st point to the imminent release of refreshed Clevo gaming laptops powered by the new Comet Lake-S desktop-grade CPUs, expected to launch this spring. User Liaojings1 obtained internal slides detailing the upcoming X170 laptops, which replace the aging P7xx-series, finally bringing Clevo's designs in line with competitors like Dell/Alienware and MSI.

Chassis and Design Improvements

To accommodate desktop-grade CPUs, the X170 features a redesigned chassis with larger rear exhaust grills. Additional upgrades include:

  • Enhanced Audio: More powerful stereo speakers and a dedicated woofer.
  • RGB Lighting: Integrated lighting on the rear and underneath the chassis.

Display and Visuals

Clevo is adopting slim-bezel...

Continue reading "Clevo X170 Gaming Laptops: Comet Lake-S Power and Upgrades" »

Multi-Threaded TCP Game Server Implementation

Computer science1.34 KB

Clientes ligam-se a servidor por TCP para jogarem. Pode ter entre 20 a 30 jogadores, de preferência 30, mas se jogador esperar mais de 1 minuto a partida começa com pelo menos 20. O jogador envia o nome ao servidor e fica à espera que o jogo comece e nessa altura é informado dos nomes dos outros.
1. Apresentar uma classe que implementa a interface em que os métodos têm que ser invocados em multi-thread.
Interface Jogo { List inscrever(String nome);}
public class Cliente {
public Cliente(Socket s) throws Exception {
PrintWriter pw = new PrintWriter(s.getOutputStream(), true);
BufferedReader bf = new BufferedReader(new InputStreamReader(s.getInputStream()));
BufferedReader terminal = new BufferedReader(new InputStreamReader(System.in))
...
Continue reading "Multi-Threaded TCP Game Server Implementation" »

Linux Process Management: Deep Dive into Kernel Internals

Computer science27.36 KB

What is a Process?

A process is essentially a program in execution.

Lightweight Processes in Linux

Lightweight Processes (LWPs) in Linux are processes that offer better support for multithreaded applications.

Multithreaded Applications in Linux

A multithreaded application is designed to perform multiple tasks concurrently within a single process. In Linux, a straightforward way to implement multithreaded applications is to associate a lightweight process with each thread.

This approach allows threads to access the same set of application data structures by simply sharing the same memory address space, the same set of open files, and so on. Simultaneously, each thread can be scheduled independently by the kernel, meaning one thread may sleep while...

Continue reading "Linux Process Management: Deep Dive into Kernel Internals" »

Software Design Patterns: Enhancing Flexibility and Structure

Computer science3.73 KB

Design patterns offer proven solutions to recurring software design challenges, promoting code reusability, maintainability, and efficiency. They can be categorized into three main types:

Behavioral Design Patterns

These patterns focus on communication and interaction between objects, enhancing flexibility. Examples include:

  • Observer Pattern: Enables one-to-many dependencies, where changes in one object automatically notify dependent objects.
  • Iterator Pattern: Provides sequential access to elements within a collection without exposing its underlying structure.

Creational Design Patterns

These patterns address object creation mechanisms, ensuring suitable instantiation processes. Examples include:

  • Singleton Pattern: Restricts object creation to a single
...
Continue reading "Software Design Patterns: Enhancing Flexibility and Structure" »

Essential Tech Terms: A Comprehensive Glossary

Computer science4.83 KB

RAM (Random Access Memory)

Random Access Memory is one of two basic types of memory. Portions of programs are stored in RAM when the program is launched so that the program will run faster. Though a PC has a fixed amount of RAM, only portions of it will be accessed by the computer at any given time. Also called memory.

Scrolling

Scrolling allows lines displayed on the screen to be moved up or down by one line as a new line is added and an existing one is removed.

Shooter

A shooter is a game whose main focus is combat involving guns or other projectile weapons such as missiles.

Shopping Cart

A shopping cart is software that keeps track of what you buy on a site.

Software Engineer

A software engineer is a person that writes computer programs.

Speech Recognition

Speech

...
Continue reading "Essential Tech Terms: A Comprehensive Glossary" »

Low-Level Programming: Machine Language, Pep/8 Assembly, and Algorithms

Computer science3.92 KB

Computer Fundamentals and Data

A Computer is a programmable electronic device that can store, retrieve, and process data.

Data and Instructions: Instructions that manipulate data are logically the same as the data itself and can be stored in the same memory location.

Understanding Machine Language

Machine Language is a language made up of binary-coded instructions built directly into the computer's hardware and used by the processor.

Why Machine Language?

It is the fundamental language the hardware understands (no choice).

Characteristics of Machine Language

  • Every processor has its own unique set of machine instructions.
  • The relationship between the processor and the instructions it can carry out is completely integrated.
  • Each machine-language instruction
...
Continue reading "Low-Level Programming: Machine Language, Pep/8 Assembly, and Algorithms" »

Assembler Functions and Two-Phase Translation

Computer science2.83 KB

Functions of an Assembler

The fundamental task of an assembler is to translate a program in assembly language to code for machine language. In essence, the assembler must perform the following tasks:

  • Convert the code (opcode or mnemonic: e.g., LDA, STX) to the equivalent code in machine language.
  • Convert symbolic operands (tags or variables) into the addresses of the operands.
  • Build the machine language instructions in the appropriate format.
  • Convert the constants defined in the program into their true representation.
  • Write the "listing" in assembly language to machine language code.
  • Process the assembly guidelines. The guidelines are instructions or commands directed to the assembler, which it processes and executes as it encounters them in the assembly
...
Continue reading "Assembler Functions and Two-Phase Translation" »

Object Identity, Complex Objects, and Persistent Programming

Computer science2.77 KB

Object Identity Types

There are three main types of object identity:

  • Asset (Data Value as Identity): This form of identity, commonly used in relational systems, utilizes a data value as the identifier. For instance, the primary key value in a tuple uniquely identifies that tuple.
  • Name (User-Defined Identity): This type of identity relies on a name assigned by the user. File systems often employ this approach, where each file has a unique name regardless of its content.
  • Incorporated (System-Generated Identity): This concept integrates identity directly into the data model or programming language, eliminating the need for user-provided identifiers. Object-oriented systems commonly use this method, automatically assigning a unique identifier to each
...
Continue reading "Object Identity, Complex Objects, and Persistent Programming" »

jQuery Functions and HTML Form Management

Computer science15.61 KB

jQuery Selectors

jQuery selectors are used to select and access HTML elements in a webpage. They help in finding elements so that different operations like hiding, showing, styling, and event handling can be performed easily. Selectors in jQuery are similar to CSS selectors and start with the dollar sign $().

Basic Syntax

$(selector).action();

  • $: Defines jQuery
  • selector: Selects HTML elements
  • action(): Performs operations on selected elements

Example: $("p").hide(); (This hides all paragraph elements.)

Types of jQuery Selectors

1. Element Selector

This selector selects elements based on the tag name.

Syntax: $("tagname")

Example: $("h1").hide(); (It hides all <h1> elements.)

  • Selects all elements of the same type
  • Easy to use

2. ID Selector

This selector...

Continue reading "jQuery Functions and HTML Form Management" »