Notes, summaries, assignments, exams, and exercises for Computer science for Other courses

Understanding DNS Protocols and Network Naming

Computer science2.6 KB

DNS Protocols and Services

In data networks, devices are labeled with a numeric IP address so they can participate in sending and receiving network messages. However, most people spend much time trying to remember these numerical addresses. Therefore, domain names were created to convert the numeric addresses into a simple and recognizable name.

The DNS protocol defines an automated service that matches resource names with the numeric network address requested.

Top Level Domains (TLDs)

The different top-level domains represent the kind of organization or the country of origin. Examples of top-level domains are:

  • .au: Australia
  • .co: Colombia
  • .com: A firm or industry
  • .jp: Japan
  • .org: A nonprofit organization

The Application Layer

The application layer is...

Continue reading "Understanding DNS Protocols and Network Naming" »

Oracle Tablespaces, Segments, and Data Blocks Explained

Computer science2.39 KB

Oracle Tablespaces and Data Storage

System tablespaces and the required sysaux tablespace are created when the database is created and must be online.

The System tablespace is used for core functionality, for example, the data dictionary tables.

The auxiliary Sysaux tablespace is used for additional database components, such as the Enterprise Manager repository.

A tablespace accounts for one or more data files.

Data files belong to one tablespace.

User process: It begins when the user database server requests a connection to Oracle.

Process server: Connects to the Oracle instance and starts when a user establishes a session.

Background processes: Start the Oracle instance.

Oracle is a server management system database that provides an open, comprehensive,...

Continue reading "Oracle Tablespaces, Segments, and Data Blocks Explained" »

C Programming: Numerical Algorithms and Control Flow

Computer science18.07 KB

Unit 3: Core C Programming Concepts

Extracting Digits of a Number

Extracting digits of a number is a fundamental programming task used in various computational problems, such as reversing a number, checking for palindromes, or performing digit-based calculations. There are two main approaches: right-to-left extraction and left-to-right extraction.

Right-to-Left Extraction

In right-to-left extraction, the modulus operator (%) is used to obtain the last digit of the number, while integer division (/) removes the last digit after processing. For example, for the number 1234:

  • 1234 % 10 gives 4.
  • 1234 / 10 gives 123.

This process is repeated until the number becomes zero, allowing each digit to be handled individually.

Left-to-Right Extraction

Left-to-right...

Continue reading "C Programming: Numerical Algorithms and Control Flow" »

Assembly Language Fundamentals: Registers, Operands, and Data Types

Computer science4.73 KB

Assembly Language Fundamentals: Key Concepts and Definitions

1. Clock Frequency and Cycle Time

A clock that oscillates 1 million times per second (1 MHz) produces a clock cycle duration of $10^{-6}$ seconds (1 microsecond).

2. General-Purpose Registers (8-bit, 16-bit, and 32-bit Access)

The general-purpose registers that can be accessed in 8 bits, 16 bits, and 32 bits are: EAX, EBX, ECX, and EDX.

3. Purpose of EAX and ECX Registers

These registers serve specific roles in CPU operations:

  • EAX – Accumulator: Automatically used by multiplication and division instructions. It is often referred to as the extended accumulator register.
  • ECX – Loop Counter: The CPU automatically uses ECX as a counter for loop instructions.

4. Reserved Words and Identifiers

...
Continue reading "Assembly Language Fundamentals: Registers, Operands, and Data Types" »

Python Fundamentals and String Methods for Data Preparation

Computer science5.02 KB

Day 1: Python Basics for AI/ML Preparation

Output Statements

  • print() – Displays output to the console.
  • end=" " – Prevents a new line after the print statement.
  • sep="," – Specifies the character used to separate multiple items in the output.

Input and Type Casting

  • The input() function always returns a string data type.
  • Adding strings results in *concatenation* (e.g., "5" + "10" = "510").
  • Use int() or float() for numerical input conversion:

    Example: num = int(input("Enter a number: "))

Variables and Data Types

  • Common types include int (integer), float (decimal), str (string), and bool (boolean).
  • Use type(variable) to check the data type of any variable.

Formatted Strings (f-Strings)

  • Used for easy string formatting and embedding variables:

    Example: print(

...

Continue reading "Python Fundamentals and String Methods for Data Preparation" »

Core Concepts in Network Layer Protocols and Routing

Computer science578.11 KB

1)A virtual-circuit network (VCN) is a hybrid network model that combines features of both circuit-switched and datagram networks. It provides a balance between connection-oriented and connectionless transmission methods :-Three Phases in a Virtual-Circuit Network In a virtual-circuit network, the communication between a source and destination involves three phases: setup, data transfer, and teardown. These phases ensure that a reliable path is established and maintained for the communication session. 1. Setup Phase: o The source and destination use their global addresses to establish a connection. During this phase, switches along the path create table entries to store information about the virtual circuit. This phase ensures that each switch...

Continue reading "Core Concepts in Network Layer Protocols and Routing" »

C# and .NET Core Fundamentals: Essential Programming Concepts

Computer science14.54 KB

.NET Framework and Its Core Components

The Microsoft .NET Framework is a comprehensive and consistent programming model developed by Microsoft for building applications with visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes. The .NET Framework is a software development platform used for building and running Windows applications. It provides a controlled programming environment where software can be developed, installed, and executed primarily on Windows-based operating systems.

Key Components of .NET Framework:

  1. Common Language Runtime (CLR): The CLR is the execution engine for .NET applications. It provides core services such as:
    • Memory management (garbage collection)
    • Thread
...
Continue reading "C# and .NET Core Fundamentals: Essential Programming Concepts" »

Object-Oriented Programming Examples: Delphi and C++

Computer science9.22 KB

Introduction to OOP Concepts

This document presents practical code examples demonstrating fundamental Object-Oriented Programming (OOP) concepts in both Delphi (Pascal) and C++. It covers class definitions, object instantiation, properties, events, static members, inheritance, polymorphism, memory management, and exception handling.

Delphi Object-Oriented Programming

The following Delphi code illustrates the creation of classes, properties, events, and static members, along with their usage in a console application.


program Cheat;
{$APPTYPE CONSOLE}

uses
  SysUtils, Classes;

type
  TNotify = procedure(Sender: TObject) of object;

  TEngine = class
    procedure Start;
    begin
      Writeln('Engine Started');
    end;
  end;

  TCar = class
...
Continue reading "Object-Oriented Programming Examples: Delphi and C++" »

BPSK and QPSK Modulation Techniques with Python

Computer science4.97 KB

BPSK Signal Generation

This section demonstrates the generation of a Binary Phase Shift Keying (BPSK) signal using Python.

import numpy as np
import matplotlib.pyplot as plt

def bpsk_detect(modulated_signal, carrier):
    return np.sign(modulated_signal * carrier)

message_frequency = 10
carrier_frequency = 20
sampling_frequency = 30 * carrier_frequency
t = np.arange(0, 4/carrier_frequency, 1/sampling_frequency)
message = np.sign(np.cos(2 * np.pi * message_frequency * t) + np.random.normal(scale = 0.01, size = len(t)))
carrier = np.cos(2 * np.pi * sampling_frequency/carrier_frequency * t)
modulated_signal = carrier * message
detected_message = bpsk_detect(modulated_signal, carrier)

plt.figure(figsize=(12, 8))
plt.subplot(4, 1, 1)
plt.plot(t,
...
Continue reading "BPSK and QPSK Modulation Techniques with Python" »

Core Algorithms for Computer Graphics Rendering

Computer science649.74 KB

Circle Generating Algorithms

Circle generating algorithms are fundamental in computer graphics for rendering circles efficiently on raster displays. These algorithms calculate the points on the circumference of a circle and plot them. The most commonly used circle generating algorithms are the Midpoint Circle Algorithm and Bresenham's Circle Algorithm.

9k=

Midpoint Circle Algorithm Steps

The following steps outline the basic process for generating points in one octant, which are then mirrored to complete the circle:

  1. Step 1: Initialization. Set starting coordinates $x = 0$ and $y = r$ (radius). Calculate the initial decision parameter $p = 1 - r$.
  2. Step 2: Iteration. Repeat the following steps while $x \le y$:
    • Plot the current point $(x, y)$ and its octant
...
Continue reading "Core Algorithms for Computer Graphics Rendering" »