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

Sort by
Subject
Level

Class 11 Computer Science: JavaScript and HTML5 Essentials

Posted by Anonymous and classified in Computers

Written on in English with a size of 2.76 KB

Class 11 Computer Science: Exam-Ready JavaScript and HTML5

Here are concise, exam-ready answers for your Class 11 Computer Science Question Bank:

1. What is Client-Side Scripting?

Client-side scripting refers to programs executed on the user's browser (the client) rather than the server. JavaScript is the most common example. It is used to create interactive web pages, validate forms, and reduce server load.

2. How to Declare a Variable in JavaScript

Variables are containers for storing data. In JavaScript, they are declared using three keywords:

  • var: Used in older versions (function-scoped).
  • let: Used for block-scoped variables (recommended).
  • const: Used for variables whose values remain constant.

Example: let name = "Arsh";

3. JavaScript Data Types

JavaScript... Continue reading "Class 11 Computer Science: JavaScript and HTML5 Essentials" »

Full Stack Software Developer Portfolio: John Smith

Classified in Computers

Written on in English with a size of 2.77 KB

John Smith

Software Developer

[email protected] | (555) 123-4567 | linkedin.com/in/johnsmith | github.com/johnsmith

Professional Summary

Results-driven Full Stack Developer with experience in both front-end and back-end technologies. Skilled in working with relational and non-relational databases. Strong team player with excellent collaboration skills and a commitment to delivering high-quality code. Passionate about solving complex problems and implementing efficient software solutions.

Education

Bachelor of Science in Computer Science
University of Technology | 2016-2020

Professional Experience

Full Stack Developer | Tech Solutions Inc.

Jan 2022 - Present

  • Developed and maintained web applications using React.js for front-end and Node.js for back-
... Continue reading "Full Stack Software Developer Portfolio: John Smith" »

Linear Algebra: Row Space, Null Space, Determinants, and Gram-Schmidt

Posted by Anonymous and classified in Computers

Written on in English with a size of 2.02 MB

Finding the Basis of a Row Space

The easiest way to find the basis of a row space is to reduce matrix A to Reduced Row Echelon Form (RREF). The nonzero row vectors of R (which contain the leading 1s, or pivots) form a basis for row(A).

Finding the Basis of the Kernel

The following four steps outline the most effective method for finding a basis for null(A):

  1. Reduce A to RREF (R): Find the Reduced Row Echelon Form (R) of the matrix A.
  2. Solve the Homogeneous System: Use the RREF, R, to solve the equivalent homogeneous system Rx=0.
  3. Identify and Parameterize Variables:
    • Identify the leading variables (those corresponding to columns containing a leading 1 or pivot in the RREF) and the free variables.
    • Solve for the leading variables in terms of the free variables.
... Continue reading "Linear Algebra: Row Space, Null Space, Determinants, and Gram-Schmidt" »

Set-UID Security and Buffer Overflow Exploitation

Classified in Computers

Written on in English with a size of 3.95 KB

Set-UID Privilege Management

The Set-UID approach provides the following:

  • Fine-grained access control.
  • Normal users run special programs to gain privileges and conduct privileged operations.
  • No need for a background process; therefore, it offers better performance.
  • A larger attack surface, as environment variables come from the user process.
  • A Set-UID process does not always run with root privileges; it runs with the program owner's privileges.

Process Inheritance and Shell Variables

Environment Variables in fork() and execve()

  • In the case of fork(), all environment variables from the parent process are inherited by the child process.
  • In the case of execve(), the inherited environment variables are decided based on the parameters provided to the execve(
... Continue reading "Set-UID Security and Buffer Overflow Exploitation" »

Bisection and Regula Falsi Methods in C Programming

Posted by Anonymous and classified in Computers

Written on in English with a size of 2.07 KB

Bisection Method Implementation

#include <stdio.h>
#include <math.h>

#define f(x) (cos(x) - (x * exp(x)))

int main() {
    float x0, x1, x2, f0, f1, f2, e;
    int step = 1;

    /* Inputs */
    up:
    printf("\nEnter two initial guesses:\n");
    scanf("%f%f", &x0, &x1);
    printf("Enter tolerable error:\n");
    scanf("%f", &e);

    f0 = f(x0);
    f1 = f(x1);

    if (f0 * f1 > 0.0) {
        printf("Incorrect Initial Guesses. Try again.\n");
        goto up;
    }

    printf("\nStep\t\tx0\t\tx1\t\tx2\t\tf(x2)\n");
    do {
        x2 = (x0 + x1) / 2;
        f2 = f(x2);
        printf("%d\t\t%f\t%f\t%f\t%f\n", step, x0, x1, x2, f2);

        if (f0 * f2 < 0) {
            x1 = x2;
            f1 = f2;
... Continue reading "Bisection and Regula Falsi Methods in C Programming" »

Computer Architecture and Organization Fundamentals

Posted by Anonymous and classified in Computers

Written on in English with a size of 94.38 KB

Computer Architecture vs. Computer Organization

Computer ArchitectureComputer Organization
Deals with functional behaviorDeals with structural relationships
Visible to programmer (instruction set, addressing modes)Invisible to programmer (control signals, memory technology)
Describes WHAT the system doesDescribes HOW it is implemented
Example: x86 architectureExample: Intel Core i7 vs. Pentium

IEEE 754 Floating Point Bias

  • Single Precision (32-bit): Bias = 127 (27 - 1)
  • Double Precision (64-bit): Bias = 1023 (210 - 1)

Why Bias is Used

Bias allows storing both positive and negative exponents using only unsigned integers. Instead of storing the actual exponent, we store (exponent + bias), which is always positive. This simplifies the comparison of floating-... Continue reading "Computer Architecture and Organization Fundamentals" »

Network Fundamentals: Protocols, Addressing, Security

Posted by Anonymous and classified in Computers

Written on in English with a size of 17.78 KB

TCP Reliable Transfer and Connection Management

TCP Reliable Transfer

  1. Sequence Numbers

    • Each byte of data is assigned a sequence number. This number is used by the receiver to correctly order the data and ensure there are no missing segments.
  2. Acknowledgements

    • The receiver sends back an ACK to the sender for the sequence number of the next expected byte. If the sender receives the ACK before its timer expires, it knows everything up to that byte was received correctly.
  3. Retransmission

    • If the ACK is not received before the timer expires, the sender retransmits the data.

TCP Connection Management

Managing a TCP connection begins with a three-way handshake, which establishes a connection before any actual data is transmitted.

Steps in Three-Way Handshake

  1. SYN
    • The
... Continue reading "Network Fundamentals: Protocols, Addressing, Security" »

Registro de Películas con Flask y JavaScript

Classified in Computers

Written on in English with a size of 2.92 KB

Integración de Frontend y Backend para Películas

A continuación, se presenta la implementación técnica para el registro y gestión de películas utilizando JavaScript en el cliente y Flask en el servidor.

Implementación del Cliente con JavaScript

El siguiente bloque de código gestiona la captura de datos del formulario y su envío mediante la Fetch API:

const API_URL = 'http://127.0.0.1:5000';

const formulario = document.getElementById("pelicula_Form");
const tituloInput = document.getElementById("titulo");
const directorInput = document.getElementById("director");
const anioInput = document.getElementById("anio");

formulario.addEventListener("submit", registrar_Pelicula);

async function registrar_Pelicula(event) {
    try {
        const
... Continue reading "Registro de Películas con Flask y JavaScript" »

Synchronization and CPU Scheduling in Operating Systems

Posted by Anonymous and classified in Computers

Written on in English with a size of 3.87 KB

Chapter 5: Synchronization

Critical Section Conditions

  • Mutual Exclusion: Only one process may be in the critical section at a time.
  • Progress: If the critical section is empty, some waiting process can enter.
  • Bounded Waiting: No starvation; each process waits a bounded number of turns.

Atomic Instructions

  • Test-and-Set: old = *b; *b = TRUE; return old
  • Swap: temp = *a; *a = *b; *b = temp

Spinlocks

  • TAS:
    bool m = false;
    lock() { while (TestAndSet(&m)); }
    unlock() { m = false; }
    
  • Swap:
    bool m = false;
    lock() { bool key = true; while (key) Swap(&m, &key); }
    unlock() { m = false; }
    

Semaphores

  • wait(S): S.val--; if S.val < 0 block
  • signal(S): S.val++; if S.val <= 0 wake one
  • Binary semaphore as mutex: init = 1; lock = wait; unlock = signal

Peterson's

... Continue reading "Synchronization and CPU Scheduling in Operating Systems" »

Essential Linux and Operating Systems Concepts Explained

Posted by Anonymous and classified in Computers

Written on in English with a size of 3.25 KB

Linux and Operating Systems Fundamentals

  • 1. CD-ROM Directory: The CD-ROM contains a directory called /fortycdrom/data.
  • 2. Permissions: -rwxr-xr applies to everyone and members.
  • 3. Process Control: ID 42000 — kill -9.
  • 4. Modern Operating Systems: Applies to all.
  • 5. Child Process: Identified by the process ID.
  • 6. 11-Bit Processor: Maximum value is 2047.
  • 7. Block Special File: Represents a hard disk drive.
  • 8. POSIX Compliant: There are different standards.
  • 9. Code Execution: The following code crashes.
  • 10. Bash Command: alias bubble.
  • 11. Linux Shell: pwd prints the current working directory.
  • 12. Shell Commands: chown is used for ownership.
  • 13. Virtual Machine: Utilizes CPU and memory resources.
  • 14. File Names: ls -al lists files including their names.
  • 15.
... Continue reading "Essential Linux and Operating Systems Concepts Explained" »