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

Sort by
Subject
Level

Java HashSet1 Implementation Using HashTable

Classified in Computers

Written on in English with a size of 3.43 KB


public Class HashSet1

    implements IHashSet1

{   private IHashTable hashTable;

    private static final Object PRESENT = new Object();

    public HashSet1() {hashTable = new HashTable1();}

    public boolean add(Object o) {

        return hashTable.Put(o, PRESENT)==null;}

    public void clear() {hashTable.Clear();}

    public boolean contains(Object o) {

        return hashTable.ContainsKey(o);

}    public boolean containsAll(IHashSet1 s) {

        Iterator e = s.iterator();

        while(e.HasNext()) {

            if(!Contains(e.Next())) {

                return false;

            }

        }

        return true;

    }

    public boolean equals(Object... Continue reading "Java HashSet1 Implementation Using HashTable" »

Sequential Systems and Computer Memory Essentials

Classified in Computers

Written on in English with a size of 2.56 KB

Sequential Systems Design

A systematic way of designing any machine that passes through different states. Examples include counters, traffic lights, and vending machines. Generally called Finite State Machines/Automatas.

Mealy Machine

Outputs are a function of both inputs and the current state.

Moore Machine

Outputs are a function of the current state only.

Computer Memory

Part of the computer that stores information: instructions and data.

Organization:

Address: Identifies memory position

Content: Stored information

Memory Cell

Minimum storing element: one bit.

Word

Group of bits implied in each memory operation (8, 16, 32, 64, ... bits). It defines data bus size.

Basic Operations

Read (R) and Write (W)

Capacity

Maximum quantity of information that a memory

... Continue reading "Sequential Systems and Computer Memory Essentials" »

TCP vs UDP: Key Differences & Protocol Characteristics

Classified in Computers

Written on in English with a size of 3.24 KB

Here's a breakdown of key characteristics and differences between TCP and UDP protocols:

  • TCP and UDP sockets are created by the transport layer: False
  • Before any data exchange takes place between two UDP applications, a logical connection must be established between them: False
  • Both SMTP and POP3 are TCP based: True
  • The UDP segment contains a checksum: True
  • The TCP segment contains a checksum: True
  • UDP makes use of the Selective Repeat protocol: False
  • The Selective Repeat algorithm is used for congestion control: False
  • HTTP uses TCP as its underlying transport protocol: True
  • With POP3, the email message is always deleted from the mail server if the client downloads the email message to its local email client application: False
  • Only TCP uses port numbers,
... Continue reading "TCP vs UDP: Key Differences & Protocol Characteristics" »

Shell Scripting Basics

Classified in Computers

Written on in English with a size of 2.58 KB

#!/bin/bash (Header .Sh)
echo
"text" ("print()")
chmod u+x file.Sh
g++ add.Cpp -o name (compile)
./add < input.Txt > output.Txt
pet="dog" (variable)
echo "Hello $var" (access var)
read var (input())
echo "$x" ("" echo var echo '$x')
echo "\$x" (echo special char)
a="`cat fl.Txt`" (stores shell cmd output)
echo ${#var} (No. Char in var)
echo ${a:6:3} (return substring ${a:pos:len})
echo ${a/$from/$to} (replace 'from' to 'to)
let "b = $a + 9" (does math and ans strd in var)
var="$0" ("$0" cmd line arg, "$@", @:all)


if [ condition ] | [ "$string" ] True; length of $string is non-0 | [ -e $file ] True iff file exists
then | [ "$string1" == "$string2" ] True; strings are equal | [ -f $file ] True iff file is a file
some action | [ "$string1" != "$string2"

... Continue reading "Shell Scripting Basics" »

Understanding Computer Data Storage: Memory and Mass Storage

Classified in Computers

Written on in English with a size of 2.2 KB

Computer Data Storage

Computer data storage, often called storage or memory, refers to computer components, devices, and recording media that retain digital data used for computing for some interval of time. Computer data storage provides one of the core functions of the modern computer: information retention. It is one of the fundamental components of all modern computers and, coupled with a central processing unit (CPU, a processor), implements the basic computer model used since the 1940s.

In contemporary usage, memory usually refers to a form of semiconductor storage known as random access memory (RAM) and sometimes other forms of fast but temporary storage. Similarly, storage today more commonly refers to mass storage: optical discs, forms... Continue reading "Understanding Computer Data Storage: Memory and Mass Storage" »

Internet Safety and Digital Responsibility Guide

Classified in Computers

Written on in English with a size of 5.88 KB

What is the Internet?

The internet is a vast network of thousands of computers and devices worldwide, connected through various means like copper wires, fiber optics, and wireless connections.

Internet of Things

The Internet of Things (IoT) is a revolutionary concept that describes the connection of everyday objects to the internet. This interconnectedness allows us to interact with these objects remotely and seamlessly.

Web Browsers

A web browser is a software program that retrieves and displays the content of web pages. It acts as your gateway to accessing information and resources on the internet.

Search Engines

Search engines are sophisticated computer systems that index files stored on websites across the internet. They continuously crawl and... Continue reading "Internet Safety and Digital Responsibility Guide" »

Advantages and Disadvantages of Primary and Secondary Data Collection

Classified in Computers

Written on in English with a size of 2.99 KB

Primary data:

  • Any data that is personally collected by you. Primary data may include traffic counts, pedestrian counts, environmental indexes, questionnaires or land use surveys.

Secondary data:

  • Any data that has been collected by someone else. Secondary data collection may be found in books, on the internet, in academic journals, etc.

Census:

  • A survey carried out by nearly all countries every 10 years. It is a very detailed survey that is compulsory for everyone to fill in.



Advantages of Primary Data:

  • It is up to date (current).
  • You know how the data has been collected.
  • Includes data relevant to coursework.
  • Only covers your study area.
  • Collected in the format that you want.

Advantages of Secondary Data:

  • Can study temporal changes.
  • It can be quicker, especially
... Continue reading "Advantages and Disadvantages of Primary and Secondary Data Collection" »

Troubleshooting Wireless Network Issues: A Comprehensive Guide

Classified in Computers

Written on in English with a size of 3.83 KB

It permits traffic from wireless clients in 10.10.10 y 10.10.20The solution must have active PEFNG licensesHave Radius server send different roles for users in different departments.Apply role-based firewall policiesChange user to any in the user any svc-dhcp permit ruleClientMatchAirwave combines information from more sources, such as Radius authenticating servers and APsWireless security camera operating on channel 8To support more POE devices directly connected to the MCSet the VLANs associated with desired subnets in the WLAN settingsRADIUS serverAddition of custom rules to control access for authenticated guestsIt removes any commands that are not supported on that MC or have dependency errorsMesh Portal APChoose ClearPass or the other

... Continue reading "Troubleshooting Wireless Network Issues: A Comprehensive Guide" »

DMZ Server Configuration and Security Best Practices

Classified in Computers

Written on in English with a size of 2.6 KB

Four Servers Reside in the DMZ

  • Mail
  • WWW
  • DNS
  • Log Servers

DMZ Mail Server (a Separate Machine)

When an Email Message is Received from the Internet:

  1. Reassembles the message.
  2. Checks for malicious content.
  3. Changes the addresses of the outer firewall (which is how the mail server is known to the outside world) to that of the internal mail server and forwards the mail to the internal mail server.

To Send a Message from the Internal Network to the Internet:

  1. Reassembles the message.
  2. Checks for malicious content (and maybe for proprietary information).
  3. All internal addresses are replaced with "drib.org" (the name of the outside firewall).

DMZ WWW Server (a Separate Machine)

  • Does not contact any servers or information sources on the internal network and it contains
... Continue reading "DMZ Server Configuration and Security Best Practices" »

Understanding Operating Systems, Software, and Computer Hardware

Classified in Computers

Written on in English with a size of 2.97 KB

Operating System Scheduling

1. The OS enables running multiple programs simultaneously. Several programs can reside in RAM concurrently, yet the CPU processes only one at a time. Only one process can be active at any given moment. CPUs are incredibly fast; even brief processing periods yield significant results. The OS determines the optimal method for switching between running, runnable, and waiting processes. It manages which process the CPU executes and distributes CPU access among processes. The task of determining when to switch processes is termed scheduling.

Disk Defragmentation

2. A disk defragmenter reorganizes files on a disk, ensuring they are stored contiguously. It arranges files on the disk into adjacent locations. This enhances... Continue reading "Understanding Operating Systems, Software, and Computer Hardware" »