Notes, summaries, assignments, exams, and problems for Computer science

Essential PC Hardware Components and Form Factors

Computer science3.73 KB

PC Case Functions and Design

1. The PC case provides support and protection for all internal parts. It typically contains a reset button and provides a ventilated, spacious interior for airflow.

2. Case design is closely related to the specifications of motherboards and power supplies.

Common Case Form Factors

3. Standard form factors include:

  • PC/XT (early)
  • AT (obsolete)
  • BABY AT (rare)
  • LPX (slim)
  • ATX (normal)
  • NLX
  • WTX (for workstations and servers)

4. A famous consumer choice was the LPX, a low-profile cabinet developed by Western Digital. Its goal was to reduce size and cost; however, motherboards differed in riser card implementation, and the design was never fully finalized.

Case Modding and Customization

5. Case Modding involves modifying a chassis to...

Continue reading "Essential PC Hardware Components and Form Factors" »

PHP Session Management and MySQL Database Interaction

Computer science2.31 KB

Starting a Session and Destroying Variables (inicio.php)

session_start();
unset($_SESSION["host"]);

Creating a Session and Attempting a Connection (marco.php)

session_start();
$conn = @mysql_connect($host, $user, $password) or die("Incorrect user or password");
@mysql_select_db($db, $conn) or die("Cannot open the DB");

Assigning Connection Parameters to Session Variables

$_SESSION["host"] = $host;
$_SESSION['User'] = $user;

Starting a Session, Connecting to the Database, and Sending an Insertion Query (altas.php)

<?
 session_start();
 $conn = mysql_connect($host, $user, $password) or die("Incorrect user or password");
 mysql_select_db($db, $conn) or die("Not selected");
 $query = "insert into departments values ($dep, '$nom', '$crazy')";
 $result
...
Continue reading "PHP Session Management and MySQL Database Interaction" »

Digital Audio Fundamentals: Capture, Playback, and Processing

Computer science3.85 KB

Audio editing is the process of manipulating and refining sound recordings. To understand this, it's essential to distinguish between analog and digital sound.

Analog vs. Digital Sound

Analog sound consists of continuous waves, while digital sound is represented by discrete values.

Analog Signals

Analog signals, which constitute analog sound, can take on all values of frequency and amplitude within a given range. They are continuous representations of sound waves.

Digital Signals

In contrast, digital signals, used for digital sound, take discrete values in both time and amplitude. For sound to be edited on a computer, it must first be digitized.

Digitizing Audio: Analog to Digital Conversion

The process of converting an analog signal into a digital...

Continue reading "Digital Audio Fundamentals: Capture, Playback, and Processing" »

Mastering Discrete Event Simulation: Concepts & Project Workflow

Computer science5.31 KB

Discrete Event Simulation: Core Concepts & Project Workflow

Key Components of a Simulation Model

  • Locations

    Fixed places where entities are processed, stored, decisions are made, or other activities occur.

  • Entities

    Whatever the model processes or tracks within the system.

  • Physical Road Network

    Networks where entities and resources move and interact.

  • Resources

    Any person, equipment (e.g., vehicles), or tools used to transport entities, develop operations, or perform tasks.

  • Process

    Defines the path of entities using the system's logic and operational experience at each location.

  • Arrivals

    New entities entering the system at specific times or rates.

  • Shifts

    Defined periods for breaks or specific assignments for locations or resources, affecting availability.

...

Continue reading "Mastering Discrete Event Simulation: Concepts & Project Workflow" »

Fundamentals of C Programming and Computer Concepts

Computer science4.69 KB

Computer and Program Concepts

Program: A set of instructions to the computer written in a language understood by it.

Computer: Electronic machine.

Byte: The amount of information used by a computer to represent a character; a byte is a string of 8 bits.

Machine code: Binary encoding of a set of instructions.

Languages and Translators

Assembly language: A language that uses mnemonic codes to specify hardware operations.

Mnemonic code: An easy-to-remember word that represents a task to be performed by the processor.

High-level language: Languages that use terminology closer to human language.

Compiler: A program that translates a program written in a high-level language into machine language.

Linker: A program tasked with incorporating the library functions...

Continue reading "Fundamentals of C Programming and Computer Concepts" »

MySQL Database Management: Users, Permissions, Tables

Computer science3.76 KB

Users

  • Creation

From the Partner's Computer

  • Create user `Professor` @ '192.168.5.25' identified by 'Professor';

Local Access

  • Administrative user `Create` @ 'localhost' identified by 'Administrative';

Access from Any Computer

  • Create user `` @ '%' student identified by 'student';
  • Deletion

  • DROP
  • Permissions

To Grant Permissions

  • GRANT SELECT ON clase.cuidadores TO 'student'@'localhost';
SELECT * FROM carers;
  • GRANT SELECT (name, currency) ON clase.cuidadores TO 'student'@'localhost';
SELECT name FROM currency carers;
  • GRANT INSERT, SELECT, UPDATE ON IES.Curso TO 'Administrative'@'localhost';
  • GRANT INSERT (IdCurso, DNI), SELECT (IdCurso, DNI), UPDATE (IdCurso, ID) ON IES.Matrícula TO 'Administrative'@'localhost';

With Update

  • GRANT SELECT (name, currency), UPDATE (currency)
...
Continue reading "MySQL Database Management: Users, Permissions, Tables" »

Relational Database Fundamentals: Entities and Attributes

Computer science2.93 KB

Core Concepts: Domain, Attribute, and Entity

Domain: A set of values of any simple or elemental type which can represent the possible values a variable takes for a characteristic or property (attribute) of a representable object (entity).

Attribute: Anything capable of taking a value (data) within a domain (range of possible values). Attributes sharing the same domain are typically given the same or similar names to avoid confusion.

Entity: Anything that can hold a set of attributes with occurrences in the universe. Each occurrence is assigned values for each attribute. More formally, an entity is a set of attributes A1, A2, ..., An, taking values in their respective domains D1, D2, ..., Dn.

Understanding Relationships and Relations

A relationship...

Continue reading "Relational Database Fundamentals: Entities and Attributes" »

Enhancing Information Systems Security: A Comprehensive Approach

Computer science99.04 KB

exam 2

exa 4

Establishing Internal Controls for Information Systems Security

With the establishment of the following sub-elements of internal control, the computer system aims to determine the fundamental basis on which to set out the requirements for managing the security of information systems.

Preventing and Avoiding Threats in Systematic Areas

  • Controls to prevent and deter threats, risks, and contingencies in systematic areas.
  • Access control systems, databases, programs, and information.
  • Using privilege levels for access, keywords, and user control.
  • Monitoring user access, information, and program usage.

Ensuring Physical Security of Systems

  • Existence of manuals and instructions, as well as dissemination and enforcement of system regulations.
  • Controls on the
...
Continue reading "Enhancing Information Systems Security: A Comprehensive Approach" »

Pascal Complex Number Arithmetic Program

Computer science2.49 KB

NosComp Program;

uses crt;

Type
Record number =
Real: Real;
imag: Real;
End;

Var
n1, n2: number;
resp: char;

Procedure LeerDatos;
begin
writeln ('Real part of the first number');
readln (n1.real);
writeln ('Imaginary part of the first number');
readln (n1.imag);
writeln ('Real part of the second number');
readln (n2.real);
writeln ('Imaginary part of the second number');
readln (n2.imag);
end;

Procedure Sum;
Begin
write ('The result of adding them is:');
if (n1.imag + n2.imag) >= 0 then
writeln ( (n1.real + n2.real):2:2, '+', (n1.imag + n2.imag):2:2, 'i')
else
writeln ( (n1.real + n2.real):2:2, '-', abs (n1.imag + n2.imag):2:2, 'i')
end;

Procedure Subtraction;
begin
write ('The result of subtracting them is:');
if (n1.imag...

Continue reading "Pascal Complex Number Arithmetic Program" »

Core Concepts in Programming Logic and Algorithms

Computer science4 KB

Core Concepts in Logic and Programming

Logic

Logic is a formal science that studies the valid forms of inference. It is the study of methods and principles used to distinguish correct from incorrect reasoning.

Programming Paradigm

A programming paradigm represents a particular philosophy or approach for building software. No single paradigm is inherently better than another; each has its own advantages and disadvantages.

Types of Programming Paradigms

Imperative Programming

This paradigm uses a set of instructions that tell the computer how to perform a task by changing a program's state.

Modular Programming

In this approach, a program is divided into separate modules or subprograms to make it more readable and manageable.

Declarative Programming

This...

Continue reading "Core Concepts in Programming Logic and Algorithms" »