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

Understanding Firewalls: Essential for Network Security

Computer science3.11 KB

Firewalls lay the foundation for network security. One of the most effective steps an organization can take to ensure network security is to install firewalls. A firewall can effectively enforce general security guidelines, such as disallowing audio streaming, controlling Internet access, or providing a virtual blockade from unknown network traffic. A firewall can be implemented as a software application or a hardware device and is designed to handle a number of crucial security tasks:

  • Firewalls restrict network traffic between networks.
  • Firewalls provide a chokepoint—a single point of entry or exit.
  • Firewalls can record network activity.

Because firewalls play such an important role within a network and are usually placed in the most vulnerable...

Continue reading "Understanding Firewalls: Essential for Network Security" »

C Programming Examples: Code Snippets and Explanations

Computer science3.41 KB

C Programming Examples

Here are several C programming examples:

Vector Operations

#include <stdio.h>

void leVetor (int v [] , int tam );
int prodEscalar (int v1 [] , int v2 [] , int tam );

int main (void) {
    int v1 [ DIM ], int v2 [ DIM ];
    int i;
    int prod ;

    leVetor (v1 , DIM );
    leVetor (v2 , DIM );
    prod = prodEscalar (v1 , v2 , DIM );
    printf ("%d\n", prod );
    return 0;
}

void leVetor (int v [] , int tam ) {
    /* Completar */
}

int prodEscalar (int v1 [] , int v2 [] , int tam ) {
    /* Completar */
}

Random Number Generation

#include <stdio.h>
#include <time.h>
#include <stdlib.h>

#define VEZES 10

int main (void) {
    int i , j , k;
    double r;

    srand ( time ( NULL )); /* inicializa
...
Continue reading "C Programming Examples: Code Snippets and Explanations" »

VB.NET Code Examples for Arrays and Timer Controls

Computer science2.92 KB

Weight Calculation and Session Management in VB.NET

This example demonstrates how to handle weight data using arrays and manage application sessions with timers.

Public Class Form1
    Dim PESOPERSONA(1) As Integer
    Dim PESOTOTAL As Integer

    Private Sub Form1_Load(...)
        Me.Text = "CÁLCULO DE PESO"
        Label1.Text = "RESULTADO"
        Label2.Text = "" & vbCrLf
        PESOPERSONA(0) = 105
        PESOPERSONA(1) = 55

        For i = 0 To 7
            If PESOPERSONA(i) < 10 Or PESOPERSONA(i) > 100 Then
                Label2.Text = Label2.Text & "EL DATO DE PESO " & i & " no es válido por no estar entre 10 y 100 " & vbCrLf
            Else
                PESOTOTAL = PESOTOTAL + PESOPERSONA(i)
...
Continue reading "VB.NET Code Examples for Arrays and Timer Controls" »

Software Modeling and Requirements Specification Principles

Computer science2.62 KB

A Model: Abstraction of a System

A model is an abstraction of a semantically closed system.

1.7.2.2 Modeling Language

A modeling language is used for specifying, constructing, visualizing, and documenting software systems. It is essential for capturing the semantics of any software system, especially in complex projects where understanding is difficult without a descriptive model.

Why is it Necessary?

  • Complex systems are hard to understand without a descriptive model.
  • A modeling language is essential for capturing the semantics of any software system during a project.
  • The representation of a model in a modeling language has significant value.

1.7.3 Partition Principle

The partition principle involves dividing a system into parts to reduce complexity....

Continue reading "Software Modeling and Requirements Specification Principles" »

Windows System Administration: Users, Storage, and Processes Configuration

Computer science4.64 KB

Windows User Groups Management

All users must belong to a group.

A group is an administrative entity that can include a set of users and even other groups. All privileges granted to that group in the system are inherited directly by the users or groups who depend on it.

Standard Windows User Groups

  • Administrators: Possesses full administrative rights.
  • Duplicates: This group may relate to managing duplicate files within a domain.
  • Guests: Users with temporary or restricted access.
  • Network Configuration Operators: Can manage network settings.
  • Backup Operators: Can back up and restore files on the system.
  • Members: Users belong to this group by default (often synonymous with the standard Users group).
  • Users: Standard users who can install and uninstall applications
...
Continue reading "Windows System Administration: Users, Storage, and Processes Configuration" »

Computer Peripherals, Displays, Printers & English Grammar

Computer science4.51 KB

Input and Pointing Devices

  • Pen / stylus — Light
  • Game controller — game controller (handheld)
  • Scanner — scanner
  • Mouse — shirts
  • Keyboard — keyboard
  • Graphics tablet — table chart
  • Trackball — trackball
  • Microphone — microphone

Other Input Devices

  • Bar code reader / barcode reader — handheld scanner
  • Touchpad on a portable laptop PC — mouse
  • Webcam — webcam
  • Touch-screen — touch screen
  • Cursor control keys — cursor control keys (Page Up, Page Down ...)
  • Numeric / alphanumeric keys — alphanumeric keys (letters and numbers)
  • Function keys — function keys (programmable for special actions)
  • Dedicated keys — used for command keys, e.g., Ctrl and Alt
  • Numeric keypad — keypad
  • Arrow keys — up, down, left, right
  • Return / Enter — Enter
  • Caps Lock —
...
Continue reading "Computer Peripherals, Displays, Printers & English Grammar" »

Parallel Execution, Mutex, and Deadlocks in Operating Systems

Computer science3.2 KB

Parbegin / Person Learns

Parbegin is a structure to indicate parallel execution, marking the beginning and end. Selection: A statement dividing sequential execution into parallel streams.

Its general form (Dijkstra):

parbegin Proposition1; Proposition2; Proposition n; person learns

Mutex

Mutex occurs when processes share data, preventing simultaneous access. It applies when a process accesses shared data, allowing concurrent execution of non-conflicting transactions.

Critical Sections

A process accessing shared data is in a critical section. When a process is in a critical section:

  • All other processes are excluded from their critical sections.
  • Other processes can execute outside their critical sections.
  • When a process exits, the next waiting process
...
Continue reading "Parallel Execution, Mutex, and Deadlocks in Operating Systems" »

Understanding Computer Memory and Storage Technologies

Computer science1.6 KB

Computer Memory Types

  • Main Memory (RAM): Volatile memory used for active processes.
  • Secondary Memory: Non-volatile devices for permanent data and program storage.

Common Secondary Storage Devices

Examples include hard drives, floppy disks, CD-ROMs, and DVD-ROMs.

Principles of Data Storage

  • Magnetic: Uses magnetic particles polarized in specific directions to represent logical 1s and 0s (e.g., hard drives, floppy drives, and tape drives).
  • Optical: Utilizes lasers for reading and writing data without magnetic interference.
  • Magneto-optical: A hybrid storage technology.

Hard Disk Drive (HDD) Architecture

The HDD is a primary secondary storage device consisting of several metal platters coated with a magnetic layer. Read/write arms access information on both...

Continue reading "Understanding Computer Memory and Storage Technologies" »

Key VTP and STP Networking Concepts

Computer science3.41 KB

1. What does a VTP client mode switch do when it receives a summary publication with a higher revision number?

  • A. Shipping is suspended until it receives the update subset of publications.
  • B. Issues a request for publication for the new VLAN information.
  • C. Updates the revision number and sends it to the other switches.
  • D. Deletes VLANs not included in the summary publication.
  • E. Sends summary publications to warn the other switches about state changes.
  • F. None of the above

2. What causes a VTP configured switch to issue a summary publication?

  • A. Five minutes have elapsed on the update timer.
  • B. A switch port is disabled.
  • C. The switch mode is changed to transparent.
  • D. A new host is added to the switch in the management domain.
  • E. 100 seconds have elapsed
...
Continue reading "Key VTP and STP Networking Concepts" »

OSI Model Layers and Network Infrastructure Fundamentals

Computer science3.32 KB

The Seven Layers of the OSI Reference Model

Physical Layer (Layer 1)

The Physical Layer of the OSI reference model is responsible for the physical connections of the computer to the network. It is responsible for transmitting bits of information through the medium used for transmission.

Data Link Layer (Layer 2)

The Data Link Layer is concerned with physical addressing, network topology, network access, error notification, ordered distribution of frames, and flow control.

Network Layer (Layer 3)

The aim of the Network Layer is to ensure data arrives from the origin to the destination, even though both are not connected directly. The devices that facilitate such a task are called routers.

Transport Layer (Layer 4)

The function of the Transport Layer

...

Continue reading "OSI Model Layers and Network Infrastructure Fundamentals" »