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

Computer science by level

Most viewed Computer science documents

  1. Prolog vs CLIPS: Comparison of Syntax, Rules and Search Strategies Other courses

    This document compares Prolog and CLIPS, two languages used in artificial intelligence and expert systems.

  2. BIOS Boot Process Steps and AMI BIOS Main Menu Options Explained Vocational training

    This document describes the sequence of steps the BIOS follows when a computer boots, from the Power-On Self-Test (POST) to the final summary screen.

  3. Prolog Implementation of the Traveling Salesperson Problem: Exact and Heuristic Solvers Primary education

    This document shows how to solve the Traveling Salesperson Problem in Prolog using two methods: an exact brute-force search that finds the shortest tour, and a faster Nearest Neighbor heuristic that gives a good but not always optimal route.

  4. LEGv8 Architecture and Assembly: Performance, Registers, Instructions and Branching University

    This document summarizes key concepts of the LEGv8 architecture and assembly language.

  5. Step-by-Step Installation of OmniOS with Napp-IT Primary education

    This guide walks through a manual installation of OmniOS (Bloody or Stable) with the Napp-IT web management tool, covering VM or hardware setup, network configuration with static or DHCP addressing, DNS, and first access to the web interface.

  6. IoT Wireless Protocols Explained: MQTT, LoRa, ZigBee, Wi-Fi, BLE, NFC and RFID Other courses

    This document gives a concise overview of the main wireless communication protocols used in the Internet of Things.

  7. MS-DOS CONFIG.SYS File: Configuration and Device Drivers Other courses

    This document explains the purpose of the MS-DOS CONFIG.SYS file, the first file executed at startup, and how it configures hardware, memory and applications.

  8. Adobe Fireworks Interface and Toolbar: Guide to Tools and Panels Baccalaureate

    This document introduces the Adobe Fireworks interface, including the Start page, workspace layout, menu bar, Property Inspector, panels and canvas.

  9. Von Neumann Architecture Vulnerabilities and Security Threats Explained Baccalaureate

    This document explains why the von Neumann architecture is vulnerable to buffer overflow and code injection when low-level languages allow direct memory access.

  10. Extracting Structured Institution Data with LangChain and Cohere Other courses

    This script shows how to use LangChain, the Cohere LLM and the Wikipedia API to extract structured information about an institution, such as its founder, founding year, branches, number of employees and a short summary.

  11. Windows Server 2003: Remote Installation, DHCP, Remote Desktop and DNS Vocational training

    This document explains several network services in Windows Server 2003: Remote Installation Services (RIS) for configuring client computers remotely, the Dynamic Host Configuration Protocol (DHCP) for automatic IP configuration, Remote Desktop for remote server management, and the Domain Name System (DNS) for resolving PC names to IP addresses.

Prolog vs CLIPS: Comparison of Syntax, Rules and Search Strategies

Computer scienceUpdated on 197.63 KB

Prolog vs. CLIPS: A Detailed Comparison

This document provides a comparison between Prolog and CLIPS, two popular languages used in artificial intelligence and expert systems development. We will explore their syntax, features, and applications through examples.

Facts and Rules

Prolog:

Facts:


father(tom, john).  % tom is father of john
mother(susan, john). % susan is mother of john
father(george, tom). % george is father of tom

Rules:


parent(X, Y) :- father(X, Y), mother(X, Y).
grandparent(X, Z) :- parent(X, Y), parent(Y, Z).
grandfather(X, Z) :- father(X, Y), parent(Y, Z).
grandmother(X, Z) :- mother(X, Y), parent(Y, Z).

CLIPS:

Facts:


(deffacts families
  (father tom john) ; tom is father of john
  (mother susan john) ; susan is mother of
...
Continue reading "Prolog vs CLIPS: Comparison of Syntax, Rules and Search Strategies" »

Prolog Implementation of the Traveling Salesperson Problem: Exact and Heuristic Solvers

Computer scienceUpdated on 4.75 KB

This document presents two distinct approaches to solving the Traveling Salesperson Problem (TSP) using Prolog: an exact, brute-force method and a heuristic-based Nearest Neighbor algorithm. Both implementations are demonstrated with code and sample queries.

Exact Solver: Brute-Force TSP Algorithm

This section details a Prolog program that finds the optimal (shortest) path for the Traveling Salesperson Problem by generating and evaluating all possible tours. This method guarantees the optimal solution but can be computationally intensive for larger sets of cities.

Defining City Distances in Prolog

The distances between cities are defined using dist/3 facts. The predicate is made symmetric to ensure that dist(X,Y,D) implies dist(Y,X,D).

dist(a,b,
...
Continue reading "Prolog Implementation of the Traveling Salesperson Problem: Exact and Heuristic Solvers" »

Von Neumann Architecture Vulnerabilities and Security Threats Explained

Computer scienceUpdated on 3.57 KB

Vulnerabilities in Von Neumann Architecture

The system architect of the von Neumann is the way that it can allow direct memory access to the low level languages like C and C++.

If the program goes and tries to access the memory out of bound by allocating code injection to the system, it allows the system to access the memory out of the stack which causes buffer overflow and the attacker can access the other memory from the allocated stack. This way an attacker can get access to the system. Therefore von Neumann architecture is vulnerable to code injection, the effect of the buffer overflow.

Understanding Threats and Attacks

Threats

  • It is a potential security violation that might exploit vulnerability of the system or assets.
  • Threats can be accidental,
...
Continue reading "Von Neumann Architecture Vulnerabilities and Security Threats Explained" »

Extracting Structured Institution Data with LangChain and Cohere

Computer scienceUpdated on 3.45 KB

Automated Data Extraction Using LangChain and Cohere

This script demonstrates how to leverage LangChain, Cohere, and the Wikipedia API to extract structured information about institutions. By using Pydantic, we ensure the extracted data follows a strict schema for better reliability.

Required Libraries and Data Models

First, we import the necessary modules and define our data structure using a Pydantic model to store institution details such as the founder, founding year, and employee count.

from langchain_community.llms import Cohere
from langchain.prompts import PromptTemplate
from langchain_core.runnables import RunnableLambda
from pydantic import BaseModel
import wikipediaapi

class InstitutionDetails(BaseModel):
    founder: str
    founded:
...
Continue reading "Extracting Structured Institution Data with LangChain and Cohere" »

MS-DOS CONFIG.SYS File: Configuration and Device Drivers

Computer scienceUpdated on 23.04 KB

Understanding MS-DOS CONFIG.SYS Configuration

The CONFIG.SYS file is crucial for configuring various system components, including MS-DOS, hardware, and applications, ensuring they function as intended.

System configuration information is primarily stored in the CONFIG.SYS file.

What is CONFIG.SYS?

It is a text file that contains special commands that configure computer components such as hardware (memory, keyboard, mouse, printer) for use by MS-DOS and applications.

It is the first file that runs when you start MS-DOS.

Location of CONFIG.SYS

It is usually located in the root directory, C:\.

CONFIG.SYS Runtime

MS-DOS executes this file each time you start your computer. However, if needed, you can instruct the system to skip it.

Why Modify CONFIG.SYS?

...
Continue reading "MS-DOS CONFIG.SYS File: Configuration and Device Drivers" »

Adobe Fireworks Interface and Toolbar: Guide to Tools and Panels

Computer scienceUpdated on 4.49 KB

Understanding the Adobe Fireworks Interface

Before getting started, let's define Object as any element within Fireworks, such as a circle, line, picture, or text.

The Fireworks Interface is simple. It's essential to identify each element, as you'll be using them throughout this course.

Start Page

Upon launching Fireworks, and before opening any document, the Start page appears. Here, you can open an existing document, create a new one, access recent documents, or visit Fireworks Exchange to enhance certain Fireworks functions.

Workspace

Workspace refers to the arrangement of elements like the Tools panel, Property Inspector, menus, and windows. The following image illustrates its layout.

Title Bar or Application Bar

Located at the top, it displays

...

Continue reading "Adobe Fireworks Interface and Toolbar: Guide to Tools and Panels" »

Windows Server 2003: Remote Installation, DHCP, Remote Desktop and DNS

Computer scienceUpdated on 2.83 KB

Remote Installation Services (RIS)

Remote Installation Services (RIS) are defined as software that lets an administrator configure new client computers remotely, without having to work directly on each client computer. The target clients must support remote booting.

Requirements for RIS

The use of Remote Installation Services requires several components that are pre-installed on the Windows 2003 Server operating system, specifically including:

  • Domain Name System (DNS Service)
  • Dynamic Host Configuration Protocol (DHCP)
  • Active Directory

Dynamic Host Configuration Protocol (DHCP)

The Dynamic Host Configuration Protocol (DHCP) is a TCP/IP standard designed to simplify the administration of IP configuration for network equipment. A DHCP server is a server...

Continue reading "Windows Server 2003: Remote Installation, DHCP, Remote Desktop and DNS" »

BIOS Boot Process Steps and AMI BIOS Main Menu Options Explained

Computer scienceUpdated on 3.01 KB

BIOS Boot Process Steps

The steps undertaken by the BIOS during the boot process are:

  1. Hardware Check (POST): The BIOS checks all hardware components. If a bug is found, a warning message is displayed on the screen or a beeping alarm sounds. This check is called the Power-On Self-Test (POST).
  2. Video BIOS Initialization: If the POST process completes without difficulty, the boot process continues. At this point, the video adapter's BIOS starts.
  3. Manufacturer Information: After this, information regarding the BIOS manufacturer and version is displayed.
  4. System Tests: The BIOS initiates a series of system tests. The messages now emerging are shown on the screen.
  5. Device Detection: Next, the BIOS checks the present devices and their characteristics, which
...
Continue reading "BIOS Boot Process Steps and AMI BIOS Main Menu Options Explained" »

IoT Wireless Protocols Explained: MQTT, LoRa, ZigBee, Wi-Fi, BLE, NFC and RFID

Computer scienceUpdated on 4.63 KB

1. MQTT Protocol and Architecture

MQTT is a lightweight messaging protocol designed for M2M IoT communication. It utilizes a publish–subscribe model, eliminating the need for direct device-to-device communication. Key features include low power consumption, low bandwidth usage, scalability, reliability (via QoS 0/1/2), and security (TLS). The architecture consists of a Client (publisher/subscriber device), a Broker (central server for message management, filtering, and routing), and a TCP/IP connection (CONNECT–CONNACK).

2. 6LoWPAN Working and Importance

6LoWPAN stands for IPv6 over low-power wireless personal area networks (IEEE 802.15.4). Its working mechanism involves header compression, packet fragmentation, an adaptation layer, mesh routing,...

Continue reading "IoT Wireless Protocols Explained: MQTT, LoRa, ZigBee, Wi-Fi, BLE, NFC and RFID" »

Step-by-Step Installation of OmniOS with Napp-IT

Computer scienceUpdated on 3.94 KB

Manual Installation:
Current State (Tests are Conducted in ESXi5):


1. Download OmniOS (Bloody or Stable)
2a. Option: Run on ESXi, create a new VM (Solaris 10-64) with e1000 or install on hardware (15 GB disk minimum)

2b. Run on Hardware:
You can install Omni + Napp-IT onto SATA or fast USB sticks >=16 GB (absolute minimum=8 GB when needed).
If you use USB, the best are external USB3 enclosures with a SATA SSD >=16 GB inside.
(Prefer USB3; they are mostly even faster on USB2)

3. Install with defaults from CD or USB install media, login as root (no password)

4. Setup Network. Network is set to (by default): network/physical:default,
so login as root (no password)

4.1 Create Interface
- List available interfaces and use link name, e.g., e1000g0:
dladm...

Continue reading "Step-by-Step Installation of OmniOS with Napp-IT" »