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

Sort by
Subject
Level

Web Security: Confidentiality, Authentication, and Protection Measures

Classified in Computers

Written on in English with a size of 3.48 KB

Web Security

Confidentiality: only authorized users should have access to the data

Authentication: each user must be confirmed to be who they say they are through their digital identity

Authorization: access to the different services must be conditioned by the identity and permissions attributed to each user

Integrity: the data sent must be the same as those received, avoiding manipulation or corruption

Availability: quality or condition of the information to be available to those who must access it.


Security Threats: the security of a network is exposed

Logical Causes:

This is the software that can attack the computer: malware, spam, viruses, programming errors…

Human Causes:

These are users who can damage the system: inexperienced users, hackers,... Continue reading "Web Security: Confidentiality, Authentication, and Protection Measures" »

Aircraft systems

Posted by and classified in Computers

Written on in English with a size of 10.6 KB

New jobs are admitted into the system
-- long-term or high-level scheduling

Once in the system, processes go through a number of state changes
-- short-term or low-level or CPU scheduling

A process is a "running program" or "program in execution"

Processes have a variety of states:


   RUNNING           READY                 WAITING (on I/O)
    STATE            STATE                  STATE

   +-----+                               +-----------------------+
   |     |     +--------------------+    |                 P2 P8 |
   | CPU | <== |="" p3="" |="" p6="" |="" p5="" |="" ...="">==><== i/o="" subsystem="" p13="" |="" |="" p11="" |="" +--------------------+="" |="" |="" +-----+="" +-----------------------+="" (a="" cpu=""
... Continue reading "Aircraft systems" »

Sorting Algorithms and Hash Tables: Explained and Compared

Classified in Computers

Written on in English with a size of 3.31 KB

Sorting Algorithms and Their Bounds

Results like the Ω(nlgn) lower bound on all sorting via binary comparisons are difficult to establish. On the other hand, results like the O(n2) upper bound on INSERTION-SORT are easier to achieve. Explain adequately the difference in the “ease” of arriving at these results.

One result applies to all sorting algorithms that are based on binary comparisons (and so is harder to establish) while the other result is simply for one specific sorting algorithm in the same category. A more complete answer would involve an argument that rightly recognizes that the lower bound result is one that also applies to algorithms that exist and also those yet to be devised (yes, even those that may be written a hundred... Continue reading "Sorting Algorithms and Hash Tables: Explained and Compared" »

Java File Infection Simulation and Implementation

Classified in Computers

Written on in English with a size of 2.8 KB

This document details the implementation of a Virus class in Java, focusing on binary file manipulation and stream handling.

Java Source Code for Virus Simulation

import java.io.*;
import java.util.*;

/**
 * Write a description of class Virus here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Virus
{
    // Campos  
    private File virusFile;  // Fichero con el código binario del virus
    public static final int SIZE = 100;

    /**
     * Constructor for objects of class Virus
     */
    public Virus( String nombre )
    {
        this.virusFile = new File(nombre);
    }

    /**
     * Método get para el campo this.virusFile
     * 
     * @return     this.virusFile
     */
    public File getFile(
... Continue reading "Java File Infection Simulation and Implementation" »

Understanding Databases: Concepts and Key Components

Posted by aakankshajayant and classified in Computers

Written on in English with a size of 4.58 KB

What is a Database?

A database is an organized collection of data, visualized as a container of information. The data is typically organized to model relevant aspects of reality. A Database Management System (DBMS) is a software package with computer programs that controls the creation, maintenance, and use of a database. It allows organizations to conveniently develop databases for various applications.

A database is an integrated collection of data records, files, and other objects. A DBMS allows different user application programs to concurrently access the same database. Typically, databases available on database servers are accessed through command-line or graphical user interface tools, referred to as front-ends; database servers are referred... Continue reading "Understanding Databases: Concepts and Key Components" »

Understanding Counting Principles, Knowledge Types, and Geometric Thinking

Classified in Computers

Written on in English with a size of 3.56 KB

The Counting Principles

Counting is the action of finding the number of elements in a finite set of objects. Here are the key principles:

  1. The Stable-Order Principle: To count effectively, the list of words used (like one, two, three) must be in a repeatable order.
  2. The One-to-One Principle: This involves assigning one, and only one, distinct counting word to each item being counted.
  3. The Cardinal Principle: When the one-to-one and stable-order principles are followed, the number name given to the final object in a collection represents the total number of items in that collection.
  4. The Order-Irrelevance Principle: This principle highlights that the order in which items are counted doesn't affect the total count.
  5. The Abstraction Principle: These counting
... Continue reading "Understanding Counting Principles, Knowledge Types, and Geometric Thinking" »

Oracle SQL Practice Questions: Savepoints, Roles, Functions and Triggers

Classified in Computers

Written on in English with a size of 3.25 KB

set pagesize 200
set linesize 200
Vraag 1:
ALTER TABLE afspraken MODIFY duur DEFAULT 30;
SAVEPOINT save_before;
INSERT INTO afspraken (datum, uur, pat) VALUES ('30-JAN-19', 14.15, 'p5');
INSERT INTO afspraken (datum, uur, pat) VALUES ('12-FEB-19', 9.10, 'p2');
INSERT INTO afspraken (datum, uur, pat) VALUES ('05-MAY-19', 13.30, 'p5');
ROLLBACK TO SAVEPOINT save_before;
COMMIT;
Vraag 2:
CREATE TABLE tarieven (code NUMBER(3) NOT NULL, bedrag NUMBER(4));
INSERT INTO tarieven VALUES (&code, &bedrag);
INSERT INTO tarieven VALUES (&code, &bedrag);
INSERT INTO tarieven VALUES (&code, &bedrag);
INSERT INTO tarieven VALUES (&code, &bedrag);
INSERT INTO tarieven VALUES (&code, &bedrag);
UPDATE behandelingen b
SET... Continue reading "Oracle SQL Practice Questions: Savepoints, Roles, Functions and Triggers" »

3D Cube Transformations in OpenGL: Scaling, Translation, and Rotation

Posted by aditya dani and classified in Computers

Written on in English with a size of 2.4 KB

Introduction

This program demonstrates how to draw a 3D cube in OpenGL and perform various transformations on it, including scaling, translation, and rotation about one axis.

Code

#include <GL/glut.h>

bool movingRight = false;
float xLocation = 0.0f;

void display() {
  glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
  glClear(GL_COLOR_BUFFER_BIT);
  glLoadIdentity();
  glTranslatef(0.0f, 0.0f, -5.0f);
  glTranslatef(xLocation, 0.0f, 0.0f);
  glutWireCube(2.0f);
  glutSwapBuffers();

  if (movingRight)
    xLocation -= 0.05f;
  else
    xLocation += 0.05f;

  if (xLocation < -3.0f)
    movingRight = false;
  else if (xLocation > 3.0f)
    movingRight = true;
}

void reshape(int width, int height) {
  glViewport(0, 0, (GLsizei)width, (GLsizei)
... Continue reading "3D Cube Transformations in OpenGL: Scaling, Translation, and Rotation" »

OpenCV C++ Tutorial: Load and Process Images with IplImage

Classified in Computers

Written on in English with a size of 2.91 KB

OpenCV C Source Code for Image Processing

Below is a complete C program utilizing the OpenCV library to load, display, and process two images using IplImage.

Required Libraries

#include <stdio.h>
#include <stdlib.h>
#include <opencv/cv.h>
#include <opencv/highgui.h>

Main Function and Validation

int main(int argc, char **argv) 
{
    if (argc != 3) // e.g., fruits, birds
    {
        printf("Error: Usage %s image_file_name\n", argv[0]);
        return EXIT_FAILURE;
    }
    // CV_LOAD_IMAGE_COLOR = 1 forces the resultant IplImage to be colour.
    // CV_LOAD_IMAGE_GRAYSCALE = 0 forces a greyscale IplImage.
    // CV_LOAD_IMAGE_UNCHANGED = -1

    // IMG1
    IplImage* Img = cvLoadImage(argv[1], CV_LOAD_IMAGE_UNCHANGED);
... Continue reading "OpenCV C++ Tutorial: Load and Process Images with IplImage" »

Oracle PL/SQL and SQL XML Generation Techniques

Classified in Computers

Written on in English with a size of 4.85 KB

PL/SQL Components for Race Management

The following PL/SQL objects demonstrate core database programming concepts, including custom functions for calculation, procedures for data manipulation and ranking, and triggers for auditing.

1. Calculating Global Time: The tempo_global Function

This function calculates the total elapsed time for a specific pilot by summing the duration of all stages recorded in the TempoEtapas table. It includes robust error handling using SQLCODE.

CREATE FUNCTION tempo_global (ID_piloto IN NUMBER)
RETURN NUMBER
IS
    soma_tempo NUMBER;
    coderro NUMBER;
    CURSOR c1 IS
        SELECT tempo_inicio, tempo_fim
        FROM TempoEtapas
        WHERE Piloto_idPiloto = ID_piloto;

BEGIN
    soma_tempo := 0;
    FOR item IN
... Continue reading "Oracle PL/SQL and SQL XML Generation Techniques" »