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

Full Stack Software Developer Portfolio: John Smith

Computer science2.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" »

Digital Electronics CIE-1 Exam Preparation

Computer science4.49 KB

Here is a complete and concise answer sheet for your Digital Electronics CIE-1 preparation based on your questions:


1. Design Half and Full Subtractor with Truth Table

Half Subtractor

  • Inputs: A, B
  • Outputs: Difference (D), Borrow (Bo)
  • Logic Equations:
    • Difference (D) = A ⊕ B
    • Borrow (Bo) = A' · B

Full Subtractor

  • Inputs: A, B, Bin (Borrow In)
  • Outputs: Difference (D), Borrow Out (Bo)
  • Logic Equations:
    • D = A ⊕ B ⊕ Bin
    • Bo = B · Bin + B · A' + A' · Bin

2. Working of Adder and Subtractor

Adder Circuits

  • Half Adder: Adds two bits A and B.
    • Sum = A ⊕ B, Carry = A · B
  • Full Adder: Adds three bits A, B, and Cin.
    • Sum = A ⊕ B ⊕ Cin, Cout = AB + ACin + BCin

Subtractor Circuits

  • Half Subtractor: Subtracts B from A.
    • Difference = A ⊕ B, Borrow = A' · B
  • Full Subtractor:
...
Continue reading "Digital Electronics CIE-1 Exam Preparation" »

ECSE 427 Operating Systems Final Exam Cheat Sheet

Computer science4.38 KB

ECSE 427 Final Exam Cheat Sheet

Process Management

  • Fork: Each fork() creates a new process (2^n processes after n forks).
  • Fork Output: for(i=0; i<3; i++) fork(); printf("hello\n"); prints "hello" 8 times (2^3).
  • Child/Parent Sharing: Only code, static data, and disk content are shared; heap, stack, and registers are copied.
  • Process vs. Thread Switch: Process switching is more expensive due to address space switches, TLB flushes, and cache pollution.
  • Multithreading Benefits: Even on single-core CPUs, threads are useful for blocking I/O operations.
  • Trap Steps:
    • Hardware: Save state → Change to kernel mode → Jump to trap handler.
    • OS: Identify cause → Handle trap → Return to user mode.

Memory & Paging

  • Address Translation (Virtual → Physical)
...
Continue reading "ECSE 427 Operating Systems Final Exam Cheat Sheet" »

Java Inheritance and Polymorphism Examples

Computer science3.49 KB

Single Inheritance in Java

This Single Inheritance program demonstrates how a child class inherits properties and methods from a single parent class.

class Animal {
    // Constructor of Parent class
    Animal() {
        System.out.println("Animal constructor called");
    }
    // Method of Parent class
    void eat() {
        System.out.println("I can eat");
    }
}

// Child class inheriting from Animal
class Dog extends Animal {
    // Constructor of Child class
    Dog() {
        System.out.println("Dog constructor called");
    }
    // Method of Child class
    void bark() {
        System.out.println("I can bark");
    }
}

// Main class to test inheritance
public class Main {
    public static void main(String[] args) {
        /
...
Continue reading "Java Inheritance and Polymorphism Examples" »

Software Engineering Principles and System Design

Computer science301.21 KB

Software Engineering and Processes

Agile Manifesto

  • Individuals/Interactions over Processes
  • Working software over documentation
  • Collaboration over negotiation
  • Responding to change over following a plan

Requirements Engineering

Descriptions of the services that a system should provide and the constraints on its operation.

Functional

What the system should do.

Non-functional

Not directly concerned with the specific services delivered by the system to its users.

Quality Attributes

A scenario describing quality attributes typically involves these elements:

  1. Source: Origin of the stimulus.
  2. Stimulus: The event arriving.
  3. Artifact: Where the event arrives.
  4. Environment: Conditions in which the scenario takes place.
  5. Response: The result of the event.
  6. Response Measure: Must
...
Continue reading "Software Engineering Principles and System Design" »

Core Principles of Computer Networking and Architecture

Computer science2.85 KB

Internet and Computer Networks

  • The Internet is a network of interconnected networks, linked by routers that forward data packets.
  • Computer networks consist of:
    • Intermediary devices (e.g., routers, switches)
    • Network media (e.g., cables, wireless signals)
    • End devices (hosts) that serve users

Network Documentation

  • Networks are represented using topology diagrams:
    • Physical topology – shows actual hardware connections
    • Logical topology – shows data flow and addressing
  • Logical topology diagrams indicate:
    • Devices, media, ports, and addressing schemes

Layered Network Architecture

  • Ensures interoperability between networks with different technologies.
  • The TCP/IP model is the practical standard, while the OSI model is used for reference.
  • Layers break down networking
...
Continue reading "Core Principles of Computer Networking and Architecture" »

Java Code Examples: User Name Generation and Repair Scheduling

Computer science6.34 KB

This document presents Java code snippets demonstrating two distinct functionalities: user name generation and management, and a car repair scheduling system. Each section includes method implementations with explanations of their purpose and logic.

User Name Management System

The UserName class is designed to generate and manage potential user names based on a user's first and last names. It also provides functionality to filter out names that are already in use.

UserName Class Constructor

This constructor initializes a UserName object, populating a list of possible user names. It assumes that firstName and lastName are valid strings containing only letters and have a length greater than zero.

import java.util.ArrayList;

public class UserName {

...
Continue reading "Java Code Examples: User Name Generation and Repair Scheduling" »

Essential SSH and SCP Command Cheat Sheet

Computer science4.22 KB

Connecting via SSH

Connect to a server (default port 22):

$ ssh [email protected]

Connect on a specific port:

$ ssh [email protected] -p 6222

Connect via PEM file (requires 0400 permissions):

$ ssh -i /path/file.pem [email protected]

See: SSH Permissions

Executing Remote Commands

Execute a remote command:

$ ssh [email protected] 'ls -l'

Invoke a local script:

$ ssh [email protected] bash < script.sh

Compress and download from a server:

$ ssh [email protected] "tar cvzf - ~/source" > output.tgz

SCP File Transfers

  • Copy from remote to local: scp user@server:/dir/file.ext dest/
  • Copy between two servers: scp user@server:/file user@server:/dir
  • Copy from local to remote: scp dest/file.ext user@server:/dir
  • Copy a whole folder: scp -r user@server:/dir dest/
  • Copy all files
...
Continue reading "Essential SSH and SCP Command Cheat Sheet" »

Excel & Business Software Essentials for Data Management

Computer science3.04 KB

Mastering Excel & Business Software Essentials

This document covers fundamental and advanced concepts in Microsoft Excel, alongside an introduction to Tally ERP accounting software, providing insights into essential tools for data management and business operations.

Excel Macros: Automation & VBA

A macro is a small program created in Excel to automate repetitive tasks, saving significant time and effort. Macros are developed using VBA (Visual Basic for Applications), which allows their functionality to be linked to a button or other triggers. It's essential to record or write a macro before it can be executed.

Understanding Excel Cells

A cell in Excel is a fundamental, box-like structure that forms the grid of rows and columns within a worksheet....

Continue reading "Excel & Business Software Essentials for Data Management" »

Operating Systems: System Calls, Processes, and Forking

Computer science2.83 KB

Operating Systems: System Calls and File Descriptors

OS vs. User ModeRead vs. Write OperationsSpecial File Descriptors

System Calls and Kernel Mode

Public functions provided by the OS.

open(*pathname, Flags): Returns a file descriptor; returns -1 on error.

int main(int argc, char *argv[]) {
  int fd = open(argv[1], O_WRONLY | O_CREAT | O_EXCL, 0644);
  if (fd == -1) {
    printf("There was a problem creating \"%s\"!\n", argv[1]);
    return 1;
  }
  close(fd);
  return 0;
}

Handling Data Streams

read may not return all requested bytes; it returns the actual count read. It only returns 0 at the end of the file.

void copyContents(int sourceFD, int destinationFD) {
  char buffer[kCopyIncrement];
  while (true) {
    ssize_t bytesRead = read(sourceFD,
...
Continue reading "Operating Systems: System Calls, Processes, and Forking" »