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

Sort by
Subject
Level

JavaScript Fundamentals: Quick Reference Cheat Sheet

Classified in Computers

Written on in English with a size of 2.61 KB

JavaScript Fundamentals Cheat Sheet

1. Variables

  • let: Used to declare variables that are block-scoped. This means they only exist within the block they are defined in (e.g., inside a loop or an if statement).
  • const: Used for constants, which are also block-scoped. Once assigned a value, they cannot be reassigned.
  • var: Declares variables that are function-scoped. This can lead to issues with variable hoisting and is generally less preferred in modern JavaScript.

2. Functions

  • Functions are reusable blocks of code designed to perform a specific task. They can take parameters (inputs) and can return values.
  • Functions can be defined in different ways, including traditional function declarations and arrow functions, which provide a more concise syntax.

3.

... Continue reading "JavaScript Fundamentals: Quick Reference Cheat Sheet" »

Neural Networks: Neurons, Activation, Structure

Classified in Computers

Written on in English with a size of 3.62 KB

Biological Neurons

A biological neuron is the fundamental unit of the nervous system, responsible for transmitting information throughout the body. It consists of three main parts:

  • Dendrites: These are branch-like structures that receive signals from other neurons and transmit them to the cell body.
  • Cell Body (Soma): Contains the nucleus and other essential organelles responsible for processing information.
  • Axon: A long, thread-like extension that carries nerve impulses away from the cell body to other neurons, muscles, or glands.

Neurons communicate using electrical and chemical signals through synapses, where neurotransmitters help in transmitting the signals. The brain contains billions of neurons that work together to perform cognitive functions,... Continue reading "Neural Networks: Neurons, Activation, Structure" »

Understanding Constructors and Class Variables in OOP

Classified in Computers

Written on in English with a size of 3.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" »

Cache Write Policies & Virtual Memory: A Deep Dive

Classified in Computers

Written on in English with a size of 3.47 KB

Cache Write Policies

Write-Through

  • Definition: Writes data to both the cache and main memory simultaneously.
  • Synchronization: Cache and main memory are always synchronized.
  • Write Speed: Slower, because every write goes to both cache and memory.
  • Data Integrity: Ensures data in both cache and main memory is identical.
  • CPU Performance Impact: Slower, due to the additional write to main memory.
  • Use Cases: Ideal for systems where data consistency is critical (e.g., databases).
  • Cache Miss Handling: Writes to both cache and memory on a miss.
  • Complexity: Simple to implement; doesn't require tracking of data in the cache.

Write-Back

  • Definition: Writes data to the cache first and only writes to memory when the cache line is evicted.
  • Synchronization: Cache and main
... Continue reading "Cache Write Policies & Virtual Memory: A Deep Dive" »

Object-Oriented Programming & C++ Function Overloading

Classified in Computers

Written on in English with a size of 2.76 KB

Object-Oriented Programming (OOP) Fundamentals

Object-oriented programming (OOP) is a computer programming model that uses objects to represent and manipulate data.

OOP is well-suited for large, complex, and frequently updated software. Some of the main features of OOP include:

  • Classes: User-defined data types that serve as a blueprint for individual objects, attributes, and methods.
  • Objects: Instances of a class that are created with specific data.
  • Methods: Functions that objects can perform.
  • Attributes: Represent the state of an object.
  • Abstraction: Exposes only the essential information of an object to the user.
  • Polymorphism: Adds different meanings to a single component.
  • Inheritance: Allows a class to inherit the properties and methods of another
... Continue reading "Object-Oriented Programming & C++ Function Overloading" »

Core Web Development Concepts: Node.js, Express, React, Redux, MongoDB

Classified in Computers

Written on in English with a size of 38.95 KB

Node.js Fundamentals

Understanding Node.js Modules

Modules in Node.js are reusable pieces of code that can be exported from one file and imported into another. Each file in Node.js is considered a module, operating within its own scope. Modules help organize code into separate files for better maintainability and reusability.

Types of Node.js Modules:

  1. Core Modules: Built-in modules provided by Node.js, pre-installed and ready to use.
  2. Local Modules: Custom modules created by developers for specific application logic.
  3. Third-party Modules: Modules installed via npm (Node Package Manager), extending Node.js functionality.

Key Built-in Node.js Core Modules

Core modules are essential, pre-installed components of Node.js. You can use them directly in your... Continue reading "Core Web Development Concepts: Node.js, Express, React, Redux, MongoDB" »

Essential Network Commands for Troubleshooting and Analysis

Classified in Computers

Written on in English with a size of 3.41 KB

Essential Network Commands

  • tracert Utility

    • Displays the route taken to a destination.
    • Identifies where delays or packet loss occur in the network path.
    • Syntax: tracert <destination>
  • netstat Utility

    • Displays active TCP connections and other network statistics.
    • Useful for monitoring network connections.
    • Syntax: netstat
  • ipconfig Utility

    • Displays IP configuration information.
    • Can be used to release and renew IP addresses.
    • Syntax:
      • Display configuration: ipconfig
      • Release IP address: ipconfig /release
      • Renew IP address: ipconfig /renew
  • nslookup Utility

    • Queries DNS to obtain domain name or IP address mappings.
    • Syntax: nslookup <domain>
  • ping Utility

    • Tests connectivity between two devices by sending ICMP echo requests.
    • Syntax: ping <destination>
    • Common Options:
... Continue reading "Essential Network Commands for Troubleshooting and Analysis" »

Key Concepts: Node.js Modules, Express Routing, Body Parser

Classified in Computers

Written on in English with a size of 6.67 KB

Understanding Node.js Modules & Core Functionality

In Node.js, modules are fundamental. They represent reusable blocks of code that can be exported from one file and imported into another, promoting a modular and organized application structure. Node.js features a built-in module system, allowing developers to utilize core modules, create custom modules, or integrate third-party modules.

Core Modules in Node.js

Core modules are pre-packaged with Node.js, offering essential functionalities for common tasks like file system operations, HTTP request handling, and path manipulation.

Some commonly used core modules in Node.js are:

  • fs (File System): For interacting with the file system.
  • http (HTTP): For creating HTTP servers and clients.
  • path (Path)
... Continue reading "Key Concepts: Node.js Modules, Express Routing, Body Parser" »

Java Programming: Classes, Objects, and Key Concepts

Classified in Computers

Written on in English with a size of 5.28 KB

Classes (الصفوف)

  • A class consists of variables (fields) and methods.
  • Variables are data members of a class.
  • Methods are functions that define the class's behavior.

Variables (المتغيرات)

  • Declared with a data type and a name.
  • Can be public or private.
  • Examples: int age, String name.

Methods (الأساليب)

  • Functions that perform specific tasks.
  • Can have parameters and return values.
  • Types:
    • Void methods: Don't return a value.
    • Return type methods: Return a value.
    • Static methods: Can be called without creating an object.
    • Instance methods: Require an object to be called.
    • Abstract methods: Declared without a body; used in abstract classes.
    • Overloaded methods: Multiple methods with the same name but different parameters.

Constructors (البناؤون)

... Continue reading "Java Programming: Classes, Objects, and Key Concepts" »

Programming Language Fundamentals: Core Concepts

Posted by Anonymous and classified in Computers

Written on in English with a size of 7.28 KB


1. Why Study Programming Language Concepts?

  • Expressiveness: Leverage diverse language features

  • Selection: Match language to task (e.g., LISP for AI, PHP for web)

  • Learning: Foundations ease uptake of new languages

  • Efficiency: Choose constructs (recursion vs. iteration) for performance

  • Maintenance: Better code reuse and understanding


2. Programming Domains and Typical Languages

DomainFocusLanguage Example
ScientificFloating-point computationsFortran
BusinessReports, decimals, textCOBOL
Artificial IntelligenceSymbolic processing, linked listsLISP/Prolog
SystemsEfficiency, low-level controlC
WebMarkup, scripting, general-purposeHTML/JS/PHP/Java

3. Language Categories

  • Imperative: Variables + assignment + iteration (C, Java, Python, Perl)

  • Functional: Computation

... Continue reading "Programming Language Fundamentals: Core Concepts" »