Common (in this document) and Session-Wise resource material (in comments)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# default: on | |
# description: The telnet server serves telnet sessions; it uses | |
# unencrypted username/password pairs for authentication. | |
service telnet | |
{ | |
disable = no | |
flags = REUSE | |
socket_type = stream | |
wait = no | |
user = root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table instructor_audit( | |
id char(5) NOT NULL, | |
entry_date TEXT NOT null | |
); | |
create function insert_audit() returns trigger as $pgfunc$ | |
begin | |
insert into instructor_audit(id, entry_date) values(new.id, current_timestamp); | |
return new; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select id from instructor where id not in (select id from teaches) | |
select building, sum(capacity) from classroom group by building | |
-- We create a virtual relation which is called a 'View' | |
-- Here, a virtual relation v1 is created which holds | |
-- the result of the select query which follows | |
create view v1 as select count(*) as c1 from teaches t1 group by course_id, sec_id | |
-- We then query the virtual relation, to get the maximum count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ns [new Simulator] | |
$ns color 1 Blue | |
$ns color 2 Red | |
set nf [open out.nam w] | |
$ns namtrace-all $nf | |
# Standard procedure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table employee(emp_id CHAR(5) PRIMARY KEY,emp_name varchar(15),job_name varchar(10),manager_id CHAR(5),hire_date date ,salary int,comm int,deptid char(4)); | |
insert into employee values ('66928','BLAZE','MANAGER','68319','1991-05-01',2750,0,'3001'); | |
insert into employee values ('67832','CLARE','MANAGER','68319','1991-06-09',2550,0,'1001'); | |
insert into employee values ('65646','JONAS','MANAGER','68319','1991-04-02',2957,0,'2001'); | |
insert into employee values ('64989','ADELYN','SALESMAN','66928','1991-02-20',1700,400,'3001'); | |
insert into employee values ('65271','WADE','SALESMAN','66928','1991-09-28',1350,600,'3001'); | |
insert into employee values ('66564','MADDAN','SALESMAN','66928','1991-09-08',1600,0,'3001'); | |
insert into employee values ('68454','TUCKER','SALESMAN','66928','1991-02-22',1600,0,'3001'); | |
insert into employee values ('68736','ADNRES','CLERK','67858','1997-05-23',1200,0,'2001'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Dropping the table 'courses' if it exists | |
DROP TABLE IF EXISTS courses; | |
-- Creates table 'courses' with the specified attributes and their respective datatype | |
CREATE TABLE courses(course_no INT PRIMARY KEY, course_name TEXT); | |
-- ALTER = Alters the Data Definition of a Table | |
-- Adding a column 'course_credits' | |
ALTER TABLE courses ADD course_credits INT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
/* | |
Hamming Code (4-Bit) | |
____________________________________ | |
| D6 | D5 | D4 | P3 | D2 | P1 | P0 | | |
------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
from tkinter import ttk | |
from tkinter import messagebox | |
class Form: | |
def __init__(self, master): | |
self.master = master | |
master.title("Exam Form") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int zero[5][5] = { | |
{0, 0, 1, 0, 0}, | |
{0, 1, 0, 1, 0}, | |
{0, 1, 0, 1, 0}, | |
{0, 1, 0, 1, 0}, | |
{0, 0, 1, 0, 0} | |
}; | |
int one[5][5] = { | |
{0, 0, 1, 0, 0}, |