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

Sort by
Subject
Level

Understanding Information Systems and Network Topologies

Classified in Computers

Written on in English with a size of 4.61 KB

1. Information System Definition and Functions

An information system is an organized system for the collection, organization, storage, and communication of information. It is the study of networks that people and organizations use to collect, filter, process, create, and distribute data. Essentially, it's a group of components that interact to produce information.

Objectives:

  • Efficient management of data and information
  • Improvement of business processes
  • Creation of value

The main functions are:

  • Capturing internal and external data
  • Data processing
  • Distributing information to users

2. Centralized vs. Distributed Information Systems

Centralized Systems

In a centralized system, all calculations are done on one particular computer.

Distributed Systems

In a distributed... Continue reading "Understanding Information Systems and Network Topologies" »

Protecting Against Phishing, Trojan Horses, Worms, and Viruses

Classified in Computers

Written on in English with a size of 2.75 KB

Phishing:

Hackers attempt to impersonate genuine organisations to fool the user into providing sensitive personal data. Emails are very official-looking, and they usually contain a link to a website which is an exact copy of the organisation's actual site, but it is operated by the criminals. When the user logs in with their details, the data is sent to the criminal. 

Guarding against phishing:

No reputable organisation would request personal details in an email or unsolicited phone call, because it does not need your sensitive data to access your account information. Never follow links to a bank/organisation- manually type it.

Trojan Horses:

Malware program that comes in disguise. Rely on tricking the user into downloading and running them. Involves... Continue reading "Protecting Against Phishing, Trojan Horses, Worms, and Viruses" »

Understanding HashMaps in Python: A Practical Example

Classified in Computers

Written on in English with a size of 7.43 KB

Understanding HashMaps in Python

Introduction

This document demonstrates a simple implementation of a HashMap in Python. A HashMap, also known as a hash table, is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash function is used to compute an index into an array of buckets or slots, from which the desired value can be found.

Code Implementation

The following code provides a basic HashMap class in Python:

from random import *

class HashMap:
DEFAULT_SIZE = 4096
class item:
def __init__(self,k,v):
self.key = k
self.value = v

def __init__(self):
self.table = [None] * self.DEFAULT_SIZE
self.size = 0

def __eq__(self,
... Continue reading "Understanding HashMaps in Python: A Practical Example" »

Swift Loops, Strings, and Characters: Tips and Tricks

Classified in Computers

Written on in English with a size of 6.55 KB

Loops

  • // Loop forward
  • for i in 0..
  • // do something
  • }
  • // Loop in reverse
  • for index in stride(from: 5, through: 1, by: -1) {
  • print(index) // 5,4,3,2,1
  • }
  • // OR
  • for i in (0..<10).reversed() {
  • print(i)
  • }

Strings

  • // Convert String to Array of Strings containing 1 Character
  • var strArr = str.characters.map { String($0) }
  • // Join Array of Strings into 1 String
  • var str = strArr.joined(separator: "")
  • // Split String into array
  • import Foundation
  • let fullNameArr = fullName.components(separatedBy: " ")
  • // Split String into Characters
  • let subsequences = str.characters.split(separator: " ") // Returns array of Subsequence, not array of strings
  • String(subsequences[0]) // to use as string
  • // Convert String to Array of Characters
  • sChars = Array(string.characters)

String/Character to

... Continue reading "Swift Loops, Strings, and Characters: Tips and Tricks" »

Internal Transport and Storage Systems in Warehouses

Classified in Computers

Written on in English with a size of 3.96 KB

Internal transport

Refers to the physical movement of products inside loading/unloading areas, docks, order preparation zones, truck load and any other eventual activity that implies products movements inside the warehouse.

Horizontal transport:

On this type of transport merchandise do not need to be raised to locate in a determined place. (Pallet truck, roller conveyor, conveyor belt system, auto guide transport system).

Vertical transport:

This transport not just allows the product to be transported from one place to another, but also to be raised to locate in a specific place. (Conventional forklift, retractable forklift, trilateral forklift).

Conventional forklift/truck lift (“Toros”)

Could be fixed mast or counterbalance, they need from 3... Continue reading "Internal Transport and Storage Systems in Warehouses" »

Understanding CIDR, Subnetting, and Supernetting in IP Addressing

Classified in Computers

Written on in English with a size of 3.13 KB

Drawbacks of Classful Addressing

Subnets have a fixed number of host addresses, leading to many unused/wasted IP addresses.

Solutions for IP Address Shortages

Short-term: Classless addressing
Long-term: IPv6

CIDR (Classless Inter-Domain Routing)

CIDR uses a hierarchical addressing scheme based on VLSM (Variable Length Subnet Masking).

Advantages of CIDR

  • Replaces classful addressing with a more flexible and less wasteful classless scheme.
  • Enhances route aggregation.

How VLSM Works

VLSM further subnets existing subnets by taking bits from the host ID, creating a multi-level hierarchy with "sub-subnets."

Supernetting

Supernetting combines continuous network addresses into a new address defined by the subnet mask. Multiple networks are combined into a larger... Continue reading "Understanding CIDR, Subnetting, and Supernetting in IP Addressing" »

Automated Fact-Checking of Text Summaries for Relational Databases

Classified in Computers

Written on in English with a size of 4.06 KB

Verifying Text Summaries of Relational Data Sets

Relational data is often summarized by text.
• The focus of this paper is the problem of verifying, in an automated fashion, whether text claims are consistent with the actual database.
• The authors proposed a tool for verifying text summaries of relational data sets, which works similarly to a spell checker and marks up claims that are believed to be erroneous.
• The system converts claims into SQL queries and then evaluates them.
• The main problem is converting natural language claims to SQL queries.
• The tool is called AggChecker.

AggChecker

• AggChecker consists of two parts: a relational data set and a text document.
• The text contains claims about the data.
• The goal is to
... Continue reading "Automated Fact-Checking of Text Summaries for Relational Databases" »

Fruteria: Añadir, Comprar y Pagar Frutas

Classified in Computers

Written on in English with a size of 3.49 KB

int opcion=0;

double cantidad, vuelto;

double pago, total = 0;

string[,] fruta = { { 'Manzana', '4.9' }, { 'Pera', '5.5' }, { 'Naranja', '8.6' }, { 'Platano', '2.7' } ,{ 'Fresa', '1.9' } ,{ 'Piña', '2.4' }, { 'Papaya', '4.2' }, { 'Sandia', '3.4' } ,{ 'Durazno', '3.5' } };

String[,] añaFruta = newString[50, 5];

int i=0, j=0;

int añadir = 0,tFruta=0;

do{

do{

i = 0;

Console.Write('_________________________ ' +

'FRUTERIA .... '+

'1) AÑADIR FRUTA. ');

while (i < 9)

{ Console.Write(i+2+') '+fruta[i,0]+' ');

i++;

}

if(añadir>0)

{j = 11;

i = 0;

tFruta = añadir+9;

while (i < añadir)

{Console.Write(j + ') ' + añaFruta[i, 0] + ' ');

j++;i++;

}

}

else { tFruta = 9; }

Console.Write(tFruta + 2+') Pagar. ');

opcion = int.Parse(Console.ReadLine(

... Continue reading "Fruteria: Añadir, Comprar y Pagar Frutas" »

SQL Queries and Data Modeling

Classified in Computers

Written on in English with a size of 9.73 KB

Aggregate Functions

How many hotels are there?

SELECT COUNT(*) FROM Hotel;

What is the average price of a room?

SELECT AVG(price) FROM Room;

What is the total revenue per night from all double rooms?

SELECT SUM(price) FROM Room WHERE type = 'D';

How many different guests have made bookings for August?

SELECT COUNT(DISTINCT guestNo) FROM Booking WHERE (dateFrom <= DATE'2004-08-01' AND dateTo >= DATE'2004-08-01') OR (dateFrom >= DATE'2004-08-01' AND dateFrom <= DATE'2004-08-31');

Subqueries and Joins

List the price and type of all rooms at the Grosvenor Hotel.

SELECT price, type FROM Room WHERE hotelNo = (SELECT hotelNo FROM Hotel WHERE hotelName = 'Grosvenor Hotel');

List all guests currently staying at the Grosvenor Hotel.

SELECT * FROM Guest... Continue reading "SQL Queries and Data Modeling" »

Introduction to Computer Systems and Assembly Language Programming

Classified in Computers

Written on in English with a size of 7.29 KB

Computer System

Components:

  • CPU
  • Memory (ROM/RAM)
  • I/O unit

BCD (Binary-Coded Decimal)

  • Add 0110 to the result if it falls between 1010 and 1111.

Overflow

  • Occurs when both numbers being added are positive or negative, and the result exceeds the maximum representable value.

IEEE-754 Standard

  • 32 bits: 1 sign bit, 8 exponent bits, 23 mantissa bits
  • NAN (Not a Number): Represents an error, exponent with all 1s and a sign bit of 0.
  • Always add trailing zeros to complete the required number of bits.

Decoder

  • Converts input to output using 2^n AND gates.

Memory

  • Components: Address, data, enable, read, write

Control Unit

  • Hardware instruction logic
  • Decodes and monitors the execution of instructions.

ALU (Arithmetic Logic Unit)

  • Performs numerical and logical evaluations.
  • Receives
... Continue reading "Introduction to Computer Systems and Assembly Language Programming" »