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

Graph Theory and Algorithms Overview

Computer science27.7 KB

Loop Invariant:

Initialization:
1. The loop invariant states that after the 0th iteration...
2. Loop Invariant at alpha = 0
3. Before the first iteration ...
4. explanation of all the code before the loop
5. Thus the invariant is true after the 0th iteration (before first)
Maintenance:
1. Assume that the loop invariant is true after the (alpha - 1)th iteration. I will prove that after the (alpha)th iteration...
2. State loop invariant at alpha = alpha
3. On the (alpha)th iteration...
4. explanation of all the code within the body of the loop (might need to show mathematical logic)
5. As we can see, the invariant holds true after the (alpha)th iteration, thus proving maintenance.

Big-Theta, Big-Oh, Big-Omega

For the following definitions, recall that N+ is
...
Continue reading "Graph Theory and Algorithms Overview" »

Layered Security Model and IT Infrastructure Best Practices

Computer science4.11 KB

10LayerModelSecurity,10Security policies and mandates.9,Oversight of end-to-end processes to ensure compliance with enterprise security policies. Audit trails for the threads.8Security roles and responsibilities. Standard security practices as they relate to activities and exchanges. Security Architecture. Personnel security requirements. 3.10. Management7Application service security (e.g., integrity of the service and application code) and content security (e.g., security labels). Security of user access to IT. Privilege management. 6Framework service security (e.g., integrity of the service and application code of the framework). Content security labeling service and label checking service. Software-based content encryption/decryption services...

Continue reading "Layered Security Model and IT Infrastructure Best Practices" »

Excel Pivot Tables, Search and Logic Functions, Macros

Computer science16.44 KB

Explanation

10.1 Pivot tables

What is a pivot table? It is one of the most powerful tools in Excel. They are also called “dynamic” because the data on them can be changed by rearranging or changing the position of the column and row headers in an easy and quick way.

The use of a dynamic table is to obtain information summaries from our data grid in order to be able to quickly analyze big volumes of information. These type of tables can be used in situations such as:

  • When you have a table with rows that have different date and you need to organize the information by time periods (month, semester, etc.)
  • When you need to change the arrangement in the rows or column cells to show different perspectives from the same data set.


Follow these steps to...

Continue reading "Excel Pivot Tables, Search and Logic Functions, Macros" »

Factors Affecting Second Language Acquisition: Readiness to Notice and Task Demands

Computer science5.8 KB

5. Readiness to Notice (means be ready prepared)

The current state of the interlanguage system (when you're studying your first SLA). What the L is ready to notice (or attend to) due to his/her internal structures or mechanisms (some Ls are going to be more able than others to noticing structures). Pieneman’s Multidimensional Model (word order acquisition in L2 German or emergence of questions in L2 English). Acquisition of word in German. EX: Capacity to place adverbs at the beginning of sentences before. Capacity to place the verb at the end of the sentence in some structures. EX. Prediction about what the L can notice: what is to be noticed refers to the next thing to be acquired: adverbs at the beginning of sentences -> verbs at the...

Continue reading "Factors Affecting Second Language Acquisition: Readiness to Notice and Task Demands" »

Types of RAM Modules: DIMM, DDR, RIMM, FB-DIMM, GDDR, SO-DIMM

Computer science2.93 KB

Memory Modules

Small printed circuit boards built on different memory chips:

  • DIMM (Dual In-Line Memory Module): Similar to the SIMM, physically larger, and have 168 contacts. They are distinguished by having a notch on both sides and two more in the row of contacts. The mounting of the sockets is different than that of the SIMM. DIMMs are found in 32, 64, 128, 256, 512 MB, and 1, 2 GB capacities.
  • DIMM DDR: Has gradually replaced the standard DIMMs. It has a total of 184 pins instead of the 168-pin DIMM of SDRAM. Physically, they resemble the above but have one notch in the row of contacts.
  • DIMM DDR2: Has 240 pins and a notch in a different position than DDR DIMMs.
  • DIMM DDR3: Also has 240 pins but is neither physically nor electrically compatible
...
Continue reading "Types of RAM Modules: DIMM, DDR, RIMM, FB-DIMM, GDDR, SO-DIMM" »

Computer Security Principles and Cryptographic Systems

Computer science29.69 KB

Foundations of Computer Security

The CIA Triad and Security Design Principles

  • Confidentiality: Ensures data is accessible only to authorized entities. It prevents unauthorized disclosure of sensitive information using encryption, access controls, and data masking.
  • Integrity: Guarantees that data remains accurate, complete, and uncorrupted by unauthorized modification or deletion. Maintained using hash functions, checksums, and digital signatures.
  • Availability: Ensures systems, networks, and data remain operational and accessible to authorized users when needed. Protected via hardware redundancy, backups, and DDoS mitigation.
  • Key Design Principles:
    • Least Privilege: Give entities only the minimum permissions necessary to perform their functions.
    • Fail-
...
Continue reading "Computer Security Principles and Cryptographic Systems" »

C++ Programming: Streams, Functions, and Memory

Computer science11.17 KB

In C++, Input/Output (I/O) operations are managed through a hierarchy of classes collectively known as streams. A stream is an abstraction that represents a flow of data between a source (like a keyboard) and a destination (like a screen).

Here is a comprehensive breakdown of how C++ handles both unformatted and formatted I/O operations, along with the core stream mechanisms.

Streams, Insertion, and Extraction

At the heart of C++ I/O are the standard stream objects:

  • cin: Standard input stream (usually the keyboard), an instance of istream.
  • cout: Standard output stream (usually the screen), an instance of ostream.

The Insertion Operator (<<)

Used with cout to output data. It "inserts" data into the output stream.

cout << "Hello, World!";
...
Continue reading "C++ Programming: Streams, Functions, and Memory" »

Mastering JavaScript Objects: A Comprehensive Reference

Computer science7.71 KB

Introduction to JavaScript Objects

In JavaScript, an object is a self-contained environment that stores data as a collection of properties and methods. A property is an association between a name (or key) and a value, while a method is a function associated with an object.

Think of an object as a real-world entity. For example, a Car is an object. It has properties like color, brand, and weight, and methods like start, drive, and brake.

// A simple conceptual look at an object
let car = {
    brand: "Tesla",       // Property (key: value)
    color: "Red",         // Property
    start: function() {   // Method
        console.log("Engine started!");
    }
};

Types of Objects in JavaScript

While almost everything in JavaScript is an object (or acts...

Continue reading "Mastering JavaScript Objects: A Comprehensive Reference" »

Understanding the C Programming Language: History and Structure

Computer science12.78 KB

That's a great request! C is a foundational language in computer science. Here is a comprehensive look at C, covering its history, importance, structure, and fundamental components.
📜 History of C
C is a general-purpose, procedural computer programming language developed in the early 1970s by Dennis Ritchie at Bell Labs.
 

  • Origin: It was primarily developed to write the UNIX operating system, which was previously written in assembly language.
  • Predecessors: C evolved from earlier languages:
    • ALGOL 60 (1960)
    • CPL (Combined Programming Language, 1963)
    • BCPL (Basic CPL, 1967)
    • B (developed by Ken Thompson, 1970)
  • Standardization: The language was later standardized by the American National Standards Institute (ANSI) in 1989, resulting in ANSI C or C89. This
...
Continue reading "Understanding the C Programming Language: History and Structure" »

Understanding Constructors and Class Variables in OOP

Computer science3.89 KB

Constructor

A constructor is a special method in object-oriented programming that is automatically called when an instance (object) of a class is created. The main purpose of a constructor is to initialize the object's attributes (properties) and allocate resources if needed. Constructors have the same name as the class and do not have a return type.

Example of a Constructor

Here is an example in Python:

class Person:
    def __init__(self):
        self.name = "John Doe"
        self.age = 30

# Creating an instance of the Person class
person = Person()

print(person.name)  # Output: John Doe
print(person.age)   # Output: 30

In this example, __init__ is the constructor method in the Person class. It initializes the name and age attributes of the...

Continue reading "Understanding Constructors and Class Variables in OOP" »