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

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" »

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 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" »

Assembly Language Instructions and MS-DOS Functions

Computer science3.39 KB

Data Transfer Instruction:

LEA

Gets source effective address and stores it in the target. Source segment address is stored in DS. Example: LEA DX, OPERANDO1

Control Transfer Instructions

Loops

Operation (IP decrement) + Conditional jump on operation result.

Example:

MOV CX, 4
Bucle:
  INC BX
  ADD BX, CX
  LOOP Bucle

Compare Instruction:

CMP

Compares source and target operands and properly modifies the flag register. It internally works by subtracting the target from the source operand. Operands are equal if the result is zero. Source is greater than target if the result is negative. Target is greater than source otherwise. Example: CMP AX, DX; Compares AX and DX.

Interrupt Instructions:

INT

INT jumps to a specified interrupt address. i8086 interrupt addresses...

Continue reading "Assembly Language Instructions and MS-DOS Functions" »

Memory Management: Algorithms and Techniques

Computer science4.4 KB

Memory Management Problems and Solutions

Deadlock Scenario

A system has four processes and five allocable resources. The current allocation and maximum needs are as follows:

What is the smallest value of x for which this is a safe state?

The needs matrix is as follows:

  • 0 1 0 0 1
  • 0 2 1 0 0
  • 1 0 3 0 0
  • 0 0 1 1 1

If x is 0, we have a deadlock immediately. If x is 1, process D can run to completion. When D is finished, the available vector is 1 1 2 2 1. Now, A has ‘10211’ and ‘11221’ is available which together satisfies maximum need. So, A is finished and now ‘2 1 4 3 2’ is available, which can satisfy C. Once C is done, the available resources are 3 2 4 4 2, which can help B finish. So, x =1 will do.

Memory Compaction

A swapping system eliminates...

Continue reading "Memory Management: Algorithms and Techniques" »

Routing Protocols: RIP, OSPF, BGP, CSMA/CD, CSMA/CA

Computer science4.41 KB

Intra-AS Routing

RIP – Based on Distance-Vector (D-V), fewer messages, converges slower, smaller size.

OSPF – Based on Link-State (L-S), converges faster, more messages, larger networks.

Distance-Vector is distributed, and each router only knows the costs to its neighbors and their distance vectors.

Link state is global and requires that each router knows the network topology and link costs to all nodes.

OSPF: Used internally inside a network, an intra-network/domain protocol used in an AS.

BGP: An internetwork protocol used between two different ASs, used at the edge of your network to connect your network to the internet.

RIP: An intra-network protocol used in an AS, used for small networks (maximum number of hops is 16).

EBGP: Runs between two...

Continue reading "Routing Protocols: RIP, OSPF, BGP, CSMA/CD, CSMA/CA" »

Essential Revit Terminology and Interface Concepts

Computer science3.67 KB

Building Information Modeling (BIM)

BIM is a complete representation or depiction of a building that aids in its design, construction, and continuous management. This is an evolving concept that changes as technological capabilities improve.

Revit Elements

An element in Revit is a discrete building block or piece of data, such as an object or drawing sheet. The four basic types of elements are:

  • Model Elements: Walls, doors, roofs.
  • Datum Elements: Levels, grids, reference planes.
  • Annotation Elements: Tags, text, dimensions.
  • View Elements: Plans, sections, schedules.

Views and Drafting

  • Detail Line: Designed to appear only in the view in which it is placed. It is treated as an embellishment to that particular view and is not added physically to the building
...
Continue reading "Essential Revit Terminology and Interface Concepts" »

Pathfinding & AI Search Algorithms: Best-First, Breadth-First, Depth-First, A*

Computer science3.58 KB

Understanding Core AI Search Algorithms

Best-First Search

If the node that receives the best evaluation is expanded first, then we are performing a Best-First Search. This algorithm expands what appears to be the best option according to its evaluation function. This function takes into account all nodes seen so far to make its decision.

Breadth-First Search

Breadth-First Search evaluates each node at a certain level before moving on to the next level. It is an optimal algorithm, seeking the shortest solution path.

How Breadth-First Search Works

It searches the entire graph or sequence without considering the goal until it is found. This algorithm does not use a heuristic. From an algorithmic point of view, all child nodes obtained by expanding a...

Continue reading "Pathfinding & AI Search Algorithms: Best-First, Breadth-First, Depth-First, A*" »

Machine Learning Algorithms: Concepts and Criteria

Computer science4.32 KB

Decision Trees

Key Characteristics

  • Advantages:
    • Easy to implement
    • Can extract rules
    • Non-incremental (more efficient and practical, without backtracking)
  • Disadvantages:
    • Objective function must be discrete
    • Primarily for classification problems

Stop Criteria

  • All examples belong to the same class
  • All samples have the same value for attributes
  • The gain on each split is insignificant
  • The number of samples has reached a certain limit

Overfitting Problem

If the number of nodes is too large, decisions are made based on very small partitions of the samples, which reduces generalization ability.

Formulas

Entropy (Ent):

Ent(S) = -(p+ * log2(p+)) - (p- * log2(p-))

Where:

  • S is the set of examples for that node.
  • p+ is the probability of positive outcomes.
  • p- is the probability
...
Continue reading "Machine Learning Algorithms: Concepts and Criteria" »