Notes, summaries, assignments, exams, and problems for Computers

Sort by
Subject
Level

Pascal Movie Database Management Procedures

Classified in Computers

Written on in English with a size of 8.83 KB

Pascal Movie Database Management

This document details several procedures written in Pascal for managing a movie database. The database is stored in a file of records, where each record represents a movie.

Data Structure

The code defines a pelicula (movie) record with the following fields:

  • codigo: integer (Movie ID)
  • genero: string (Genre)
  • nombre: string (Title)
  • duracion: integer (Duration)
  • director: string (Director)
  • copias: integer (Number of Copies)
  • precio: real (Price)

A constant valoralto is defined as 9999, used as a sentinel value.

And the file is defined as:

maestro= file of pelicula ;

Procedures

leerp(var p: pelicula)

Reads movie data from the input (keyboard) and stores it in the pelicula record p. It reads the codigo first. If it's not equal to... Continue reading "Pascal Movie Database Management Procedures" »

VHDL Implementations for Digital Logic Components

Classified in Computers

Written on in English with a size of 7.52 KB

VHDL Flip-Flop Implementations

This section demonstrates various VHDL implementations of flip-flops and latches, showcasing different clocking, clear, preset, and load mechanisms.


entity reginf is
    port (
        d, clk, clr, pre, load, data : in  std_logic;
        q1, q2, q3, q4, q5, q6, q7   : out std_logic
    );
end reginf;

architecture rtl of reginf is
begin

Active High Clock D-Latch

A simple D-latch sensitive to the rising edge of the clock.


    -- D-latch with active high clock
    process
    begin
        wait until clk='1';
        q1 <= d;
    end process;

Active Low Clock D-Latch

A D-latch sensitive to the falling edge of the clock.


    -- D-latch with active low clock
    process
    begin
        wait until clk='0';
... Continue reading "VHDL Implementations for Digital Logic Components" »

Understanding Mobile Development: The Viewport Meta Tag

Classified in Computers

Written on in English with a size of 735 bytes

Mobile Development: The Viewport Meta Tag

The viewport meta tag is crucial for responsive web design on mobile devices. It controls how the browser displays a webpage on different screen sizes. Here's a breakdown of its key attributes:

Key Attributes

  • width: Defines the viewport width. Typically set to device-width, which matches the device's screen width.
  • initial-scale: Sets the initial zoom level. A value of 1 ensures the webpage is displayed at 100% zoom initially.
  • user-scalable: A boolean attribute. Setting it to no prevents users from zooming in or out.

Core Concepts in Data Management, Mining, and Analytics

Classified in Computers

Written on in English with a size of 124.09 KB

Object Identifier (OID) Explained

OID stands for Object Identifier, which is a unique identifier assigned to each object in an object-oriented database (OODB).

Function and Structure of OIDs

In an OODB, data is stored as objects that have properties (attributes) and behaviors (methods). Each object is assigned a unique OID that identifies it uniquely within the database. OIDs are used to reference objects and to establish relationships between them.

For example, if one object in a database needs to refer to another object, it can do so using the OID of the other object. This helps to establish relationships between objects and enables the creation of more complex data structures.

OID vs. Primary Key

OIDs in database management systems are similar... Continue reading "Core Concepts in Data Management, Mining, and Analytics" »

Cybersecurity Fundamentals: Principles and Practices

Classified in Computers

Written on in English with a size of 7.68 KB

**CIA Triad: Core Security Principles**

The CIA Triad consists of Confidentiality, Integrity, and Availability. These are the fundamental goals of information security.

**Threat Modeling: Proactive Security**

Threat modeling involves system decomposition and emphasizes security by design.

**Kerckhoffs's Principle: System Security**

Kerckhoffs's Principle states that:

  1. Security should not depend on the secrecy of the system's design, but only on the secrecy of the key.
  2. The system should be usable.
  3. Keys must be easy to change.

**One-Time Pad: Unbreakable Encryption**

A One-Time Pad is an algorithm that XORs the message with a randomly generated key of equal length. It is secure if:

  1. The key is truly random.
  2. The key is as long as the message.
  3. Each key is used
... Continue reading "Cybersecurity Fundamentals: Principles and Practices" »

C Program for Bit Stuffing and Destuffing

Classified in Computers

Written on in English with a size of 4.61 KB

Bit stuffing and destuffing are crucial techniques used in data link layer protocols to ensure reliable data transmission. They prevent sequences of data bits from being misinterpreted as control characters or flags, especially when the data itself contains patterns identical to these control sequences.

What is Bit Stuffing?

Bit stuffing is the process of adding one or more extra bits into a data stream to break up a sequence of identical bits that might otherwise be misinterpreted as a control signal. For example, in protocols like HDLC, a flag sequence (01111110) is used to mark the beginning and end of a frame. To prevent the actual data from containing this sequence, a '0' bit is stuffed after every five consecutive '1's in the data stream.... Continue reading "C Program for Bit Stuffing and Destuffing" »

Computer Network Essentials: Types, Components, and Protocols

Classified in Computers

Written on in English with a size of 2.85 KB

Understanding Computer Networks

  • A computer network is the interconnection of multiple devices, generally termed as hosts, connected using multiple paths for the purpose of receiving data or media.
  • Connected devices share information and resources.
  • The channel or line is where this information is transmitted.

Computer Network Classifications

Networks can be classified in several ways:

  1. By Size: The most common classification.
  2. By Property
  3. By Connection Method
  4. By Topology

1. Network Classification by Size

  • LAN (Local Area Network): Maximum of a building. The most frequent type, common in most offices.
  • MAN (Metropolitan Area Network): Maximum of a city, connecting different buildings.
  • WAN (Wide Area Network): Connects devices from different cities or even countries.
... Continue reading "Computer Network Essentials: Types, Components, and Protocols" »

Digital Graphics and Media: Terms and Definitions

Classified in Computers

Written on in English with a size of 3.97 KB

Digital Graphics and Media: Key Terms

Image Fundamentals

  • Pixel: Individual dots that make up bitmap graphics.
  • Dots Per Inch (DPI): Also known as printer resolution. The number of dots of color a printer can produce in a certain amount of space.
  • Pixels Per Inch (PPI): The measurement of pixelation on an output device, such as a computer screen.
  • 300 PPI: The typical PPI needed for professional and commercial prints, such as advertising hoardings, for acceptable quality.
  • Megapixel: A unit used to measure the resolution of digital cameras, referring to one million pixels.
  • Bit Depth: Refers to the number of colors in an image.

Vector vs. Bitmap Graphics

  • Vector Graphics: Graphics stored as a series of mathematical shapes and properties that can be independently
... Continue reading "Digital Graphics and Media: Terms and Definitions" »

Creating BIM'S: A Collaborative Game Development Story

Classified in Computers

Written on in English with a size of 3.63 KB

Scene 1:

  • Everyone shows up in a round table with computers thinking on what is the new game they will create.

  • Poster: Brainstorm of ideas

  • Carla: What game should we create now?

  • Andrea: We can create a city!

  • Bernardo: Yes! Let’s create a game that allows creating and simulating the life of your own avatar.

  • Ines: That will be perfect! We can design clothes and accessories for the avatars

  • Cuesta: That is a great idea, and it will not take too much time to code.

  • Carla: We can also adapt the game so people can play using their smartphones.

  • Everyone: Great let's call it... BIM’S!

Scene 2:

  • Cuesta: You sit down in front of a computer and start typing codes. Let’s start with the coding

    • Question to Bernardo: Bernardo, do you remember the coding of how to make

... Continue reading "Creating BIM'S: A Collaborative Game Development Story" »

OSI Model Security and Encryption Protocols

Classified in Computers

Written on in English with a size of 4.72 KB

Common Block Cipher Modes and Encryption

Double DES: This method uses two keys for encryption. It is susceptible to the meet-in-the-middle attack, where an attacker attempts to find a match such that E(k1, M) = D(k2, C).

ECB (Electronic Codebook): Each block is encoded with the same key. Information leakage can occur with repeated messages. While it is parallelizable, it is vulnerable to block replay attacks, where an attacker monitors and replays repeated messages.

CBC (Cipher Block Chaining): This mode uses a key and an Initialization Vector (IV). The IV ensures that the same plaintext produces different ciphers, which limits information leaks. However, patterns can still emerge in long messages, and the primary drawback is a lack of integrity.... Continue reading "OSI Model Security and Encryption Protocols" »