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

Sort by
Subject
Level

Jose Andres Gutierrez Vargas: Software Developer Profile

Classified in Computers

Written on in English with a size of 3.33 KB

Jose Andres Gutierrez Vargas

Email: [email protected]
Phone: [Your Phone Number]

Professional Summary

Results-driven and highly motivated Software Developer with extensive expertise in backend and frontend development, RESTful APIs, and database management. Skilled in SQL and NoSQL databases, with in-depth experience in Node.js for building scalable and high-performance applications. Adept at optimizing system performance, troubleshooting technical issues, and implementing innovative solutions.

Former Frontend Developer at Google, where I contributed to the development of dynamic and interactive web applications, enhancing user experiences through cutting-edge technologies. Passionate about software development, staying updated with the latest... Continue reading "Jose Andres Gutierrez Vargas: Software Developer Profile" »

C Programming Algorithms: Coin Change, Knapsack, MST, Shortest Path

Posted by Anonymous and classified in Computers

Written on in English with a size of 8.06 KB

Problem Statement 16: Coin Change

Given a set of coins and a value, find the minimum number of coins to satisfy the given value.

Test Case 1:

Coins: {25, 20, 10, 5}, Value: 50 cents

Used coin: 25 cents

Used coin: 25 cents

Total number of coins: 2

Test Case 2:

Coins: {25, 20, 10, 5}, Value: 73 cents

Used coin: 25 cents

Used coin: 25 cents

Used coin: 20 cents

Used coin: 3 cents

Total number of coins: 4

Code:

-
#include int main { int amount =
50; int coins[] = {25, 20, 10, 5}; int
numCoins = 0;
printf("Amount: %d cents\n", amount);
for (int i = 0; i while (amount >= coins[i]){
amount -= coins 1;
numCoins++;
printf("Used
coin: %d cents\n", coins[i]);
}
printf("Total number of coins: %din", numCoins); return 0; }

Problem Statement 19: -#include #include int i,j,k,... Continue reading "C Programming Algorithms: Coin Change, Knapsack, MST, Shortest Path" »

8051 Microcontroller: LCD Interfacing and ADC0804 Control

Classified in Computers

Written on in English with a size of 2.51 KB

LCD Interfacing with 8051

#include <reg51.h>

sbit rs = P2^0;
sbit rw = P2^1;
sbit e = P2^2;

void msdelay(unsigned int time) {
    unsigned int i, j;
    for(i = 0; i < time; i++)
        for(j = 0; j < 1275; j++);
}

void lcd_cmd(unsigned char command) {
    P1 = command;
    rs = 0;
    rw = 0;
    e = 1;
    msdelay(1);
    e = 0;
}

void lcd_init() {
    lcd_cmd(0x38); // 2 lines and 5x7 matrix
    msdelay(10);
    lcd_cmd(0x0F);
    msdelay(10);
    lcd_cmd(0x01);
    msdelay(10);
    lcd_cmd(0x80);
    msdelay(10);
}

void lcd_data(unsigned char disp_data) {
    P1 = disp_data;
    rs = 1;
    rw = 0;
    e = 1;
    msdelay(1);
    e = 0;
}

void main() {
    unsigned char a[4] = "KTU";
    int l = 0;
    lcd_init();
    while(
... Continue reading "8051 Microcontroller: LCD Interfacing and ADC0804 Control" »

Database Management Systems and ERD Fundamentals

Posted by Anonymous and classified in Computers

Written on in English with a size of 36.02 KB

Introduction to Database Management Systems

A database is a structured collection of data stored on a computer system. It is managed using a Database Management System (DBMS), which provides the necessary tools for data storage, retrieval, and modification.

Core Benefits of Using a DBMS

  • Reduced Data Redundancy: A DBMS helps minimize repeated data through organizational rules such as normalization.
  • Enhanced Data Accuracy: The system uses specific rules, such as referential integrity, to maintain data consistency.
  • Support for Multiple Users: Many people can access and use the database simultaneously without encountering operational problems.

Centralized vs. Distributed Databases

  • Centralized: All data is stored in a single, primary location. This setup
... Continue reading "Database Management Systems and ERD Fundamentals" »

Essential SSH and SCP Command Cheat Sheet

Classified in Computers

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

Java Programming Examples and User Registration Forms

Posted by Anonymous and classified in Computers

Written on in English with a size of 2.08 KB

User Registration Form

Name:

Password:

Gender:
Male
Female

Hobbies:
Reading
Music

City:
SuratAhmedabad

Java Programming Examples

1. Simple Interest Calculation

import java.util.Scanner;
class SimpleInterest {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        float p, r, t, si;
        p = sc.nextFloat();
        r = sc.nextFloat();
        t = sc.nextFloat();
        si = (p * r * t) / 100;
        System.out.println("Simple Interest = " + si);
    }
}

2. Call Cost Calculation

import java.util.Scanner;
class CallCost {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int min;
        float rate, cost;
        min = sc.nextInt();
        rate = sc.nextFloat(
... Continue reading "Java Programming Examples and User Registration Forms" »

Grammar Analysis and Context-Free Language Exercises

Posted by Anonymous and classified in Computers

Written on in English with a size of 4.14 KB

Hexadecimal Integer Grammar Analysis

Consider the following grammar for hexadecimal integers:

  • <hex literal> ::= 0x<number>
  • <number> ::= <number><number> | <digit>
  • <digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F

The string 0xF3 is an element of the language generated by this grammar.

Derivation Sequences and Parse Trees

1. How many distinct derivation sequences exist for this string?

There exist 6 distinct derivation sequences:

  • <hex literal> ⇒ 0x<number> ⇒ 0x<number><number> ⇒ 0x<digit><number> ⇒ 0x<digit><digit> ⇒ 0xF<digit> ⇒ 0xF3
  • <hex literal> ⇒ 0x<number> ⇒ 0x<number><number> ⇒ 0x<number&
... Continue reading "Grammar Analysis and Context-Free Language Exercises" »

Client-Side Web Application Development Examples

Classified in Computers

Written on in English with a size of 8.49 KB

Client-Side Web Application Logic

Course Registration Script

This script handles the client-side logic for a course registration form. It fetches available courses, populates a selection dropdown, and processes form submissions to register new entries via an API.

DOM Element Selection and Initialization

The script begins by selecting necessary DOM elements for interaction and notification display.

const init = async function () {
  const selectEl = document.querySelector("select");
  const formEl = document.querySelector("form");
  const notifEl = document.querySelector(".success-notif");
  const errNotifEl = document.querySelector(".fail-notif");

Notification Dismissal Logic

Functionality to close success and error notification boxes is implemented

... Continue reading "Client-Side Web Application Development Examples" »

C++ Code Examples: Essential Algorithms & Programs

Classified in Computers

Written on in English with a size of 5.54 KB

C++ Code Examples: Essential Algorithms & Programs

Here are some fundamental C++ code examples covering various algorithms and programming concepts:

Factorial Calculation

#include <iostream>
using namespace std;

long factorial(int x) {
 int i, f = 1;
 for (i = 1; i <= x; i++) {
 f = f * i;
 }
 return f;
}

int main() {
 int n;
 cout << "Enter the number: ";
 cin >> n;
 if (n < 0) {
 cout << "Factorial is not defined for negative numbers";
 } else {
 cout << "Factorial = " << factorial(n);
 }
 return 0;
}

String Length Finder

#include <iostream>
using namespace std;

int main() {
 int length = 0, i;
 char s[20];
 cout << "Enter the string: ";
 cin.getline(s, 20);
 for (i = 0; s[i] != '\0'
... Continue reading "C++ Code Examples: Essential Algorithms & Programs" »

Database Fundamentals: Normalization, Storage, and SQL Queries

Classified in Computers

Written on in English with a size of 4.08 KB

This document summarizes key concepts and solutions from previous database exam questions.


Relational Schema with Functional Dependencies

  • Schema: R(A, B, C, D, E, F)
  • Dependencies: C → F, E → A, EC → D, A → B
  1. Candidate Keys: CE
  2. Prime Attributes: C, E
  3. Second Normal Form (2NF):
    • No, because of partial dependencies:
      • C → F (partial dependency)
      • E → A, B (partial dependency)

EMP_DEPT Table Analysis

  1. Functional Dependencies:
    • Ssn → Ename, Bdate, Address, Dnumber, Dname, Dmgr_ssn
    • Dnumber → Dname, Dmgr_ssn
    • Dmgr_ssn → Dnumber, Dname
    • Dname → Dnumber, Dmgr_ssn
  2. First Normal Form (1NF):
    • Split names into first_name and last_name.
  3. Second Normal Form (2NF):
    • Already in 2NF because there are no partial dependencies.

EMP_PROJ Table Normalization

  1. Functional Dependencies:
... Continue reading "Database Fundamentals: Normalization, Storage, and SQL Queries" »