CSE304 COMPUTER GRAPHICS

2:24 PM 4 Comments


QUESTION PAPER WILL COMING SOON


4 comments:

pl/sql PROGRAMING

7:05 AM 0 Comments

Third type of sequence statement
1) goto statement: it transfer the flow of control to the label unconditionaly.
 syntex: goto 
OUTPUT:
TO drop TRIGGER: drop trigger trigger name;
Q: create a trigger that insert a tupple into t5when the tupple into t4 spaceficaly the trigger chacks w
hether the new tupple has a first coponent 10 or less and if show the reverse tupple into t5.
ANS:
create table t41
(
a int,
b char(10)
);
create table t51
(
c char(10),
d int
);
set serveroutput on;
create or replace trigger t41
after insert on t41
for each row
when(new.a<=10) //trigger restriction
begin
insert into t51 values(:new.b,:new.a);
end;
insert into t41 values(5,'asd')


https://www.mediafire.com/folder/9z3cmblhwymm0/ds_pracicle

Q:create a trigger that displays the number of employees after every delete in emp table
Ans:
create table emp0248
(
empno number(20),
name char(20)
);
create or replace trigger t0248
after delete on emp0248
declare
n int;
begin
select count(n) into n from emp;
dbms_output.put_line('Employee Remaining'||n||'after deletion');
end;


Q:stop the transection if the salary enter by the user exceed 50000 in table employee?
Ans:
create or replace trigger t0248
before inserte and delete of sal in emp
for each row
when(new.sal>50000)
begin
RAISE_APPLICATION_ERROR(20001,''MSC');                  //use to raise problem in program
end;


server: http://172.17.14.100/isqlplus dated:- 4/4/14

subprograms:-
1)Procedures
2)Stored Procedure
3)Functions

Procedure-Syntex
set serverouput on;
declare
global variables
procedure procedurename(arguments IN/OUT/INOUT detatype)
IN/AS
begin
PL/SQL statements;
End procedurename
begin
exwcute start;
procedure calling;
end;
                                         
IN: this type of parameterwill accept the value from the user.
OUT: this type of parameter will return th value to the user.
IN/OUT:this type of parameter will accept as well as return the value from the user. 


//WAP to find the product of two number
set serveroutput on;
declare
num1 number(2);
num2 number(2);
mul number(4);
procedure multiplication
(num1 IN number,
num2 IN number,
mul OUT number
)
IS
begin
mul:=num1*num2;
end multiplication;
begin
num1:=&num1;
num2:=&num2;
multiplication(num1,num2,mul);
dbms_output.put_line(mul);
end;

//Write a stored procedure to find sum of two number
set serveroutput on;
declare
num1 number(2);
num2 number(2);
mul number(4);
procedure multiplication
(num1 IN number,
num2 IN number,
mul OUT number
)
IS
begin
mul:=num1+num2;
end multiplication;
begin
num1:=&num1;
num2:=&num2;
multiplication(num1,num2,mul);
dbms_output.put_line(mul);
end;
// create or replace procedure->
create or replace procedure as321(num1 in number,num2 in number, asd out number)
is
begin
asd:=num1+num2;
end;

set serveroutput on;
declare
num1 number(2);
num2 number(2);
asd number(2);
begin
num1:=&num1;
num2:=&num2;
as321(num1,num2, asd);
dbms_output.put_line(asd);
end;

<---------------function---------------------->
syntex:
set serveruotput on;
declare
global variable
function functionname(argument
return datatype
is
begin
pl/sql statement;
return(variable);
end functionname;
begin
executable statements;
end;
mul:=multiply(num1,num2,mul);
dbms_output.put_line(mul);
end;

//Write a function to multiply two number
set serveroutput on;
declare
num1 number(2);
num2 number(2);
mul number(4);
function multiplication
(num1 IN number,
num2 IN number,
mul OUT number
)
return number
IS
begin
mul:=num1*num2;
return(mul);
end multiplication;
begin
num1:=&amp;num1;
num2:=&amp;num2;
mul:=multiplication(num1,num2,mul);
dbms_output.put_line(mul);
end;

server: http://172.17.14.100/isqlplus
//to find even or odd
set serveroutput on;
declare
a number(2);
begin
a:=&amp;a;
if  mod(a,2)=0
then
dbms_output.put_line('no is even');
else
dbms_output.put_line('no is odd');
end if;
end;
//to find greatest of three no.
set serveroutput on;
declare
a number(2);
b number(2);
c number(2);
begin
a:=&amp;a;
b:=&amp;b;
c:=&amp;c;
if (a&gt;b)and(a&gt;c)
then
dbms_output.put_line('a is greatest no');
else if (b&gt;a)and(b&gt;c)
then
dbms_output.put_line('b is greatest no');
else if (c&gt;a)and(c&gt;b)
then
dbms_output.put_line('c is greatest no');
end if;
end if;
end if;
end;
//to find square of number
set serveroutput on;
declare
i number(2);
begin
i:=&amp;i;
i:=i*i;
dbms_output.put_line(i);
end;
control structure
1.loop
2.while loop
3.for loop
<-----------------------loop---------------------->
//to print 1st 10 number
set serveroutput on;
declare
i number(2);
begin
i:=1;
loop
dbms_output.put_line(i);
i:=i+1;
exit when i&gt;10;
end loop;
end;
<-------------------end data-blogger-escaped-loop----------------------="">

<---------------------while data-blogger-escaped-loop------------------="">
//to find square of 1st 10 number
set serveroutput on;
declare
i number(2);
begin
i:=1;
while i<11 data-blogger-escaped-br="">loop
dbms_output.put_line(i*i);
i:=i+1;
end loop;
end;
//sum of 1st 10 number
set serveroutput on;
declare
i number(2);
a number(2);
begin
i:=1;
a:=0;
while i<11 data-blogger-escaped-br="">loop
a:=a+i;
i:=i+1;
end loop;
dbms_output.put_line(a);
end;
<------------------end data-blogger-escaped-loop-----------------="" data-blogger-escaped-while="">
<---------------------for data-blogger-escaped-loop--------------------="">
//to prin table of 2
set serveroutput on;
declare
i number(2);
a number(2);
begin
i:=1;
for i in 1..10
loop
dbms_output.put_line('2 X '||i||'= '||a);
end loop;
end;
<------------------end data-blogger-escaped-for="" data-blogger-escaped-loop-------------------="">
//to find factorial of no
set serveroutput on;
declare
i number(10);
a number(10);
begin
i:=&amp;i;
a:=1;
while i&gt;1
loop
a:=i*a;
i:=i-1;
end loop;
dbms_output.put_line('factorial of '||i||' is '||a);
end;
//fibonacci series
set serveroutput on;
declare
i number(2);
a number(2);
b number(2);
c number(2);
n number(2);
begin
n:=&amp;n;
b:=1;
a:=0;
dbms_output.put_line(a);
dbms_output.put_line(b);
for i in 1..n-2
loop
c:=a+b;
dbms_output.put_line(c);
a:=b;
b:=c;
end loop;
end;


0 comments:

SECRET OF YOUTUBE

1:38 PM 0 Comments


step1: open youtube
step2: type "use the force luke" in the search box
step3: press enter
AND SEE WHATS HAPPEN


While watching youtube press "1980" and save your video from missile


step1: open youtube
step2: type "beam me up scotty" in the search box
step3: press enter
AND SEE WHATS HAPPEN



step1: open youtube
step2: Add "&pow=1&nohtml5=1" to your searching video 
step3: press enter
IT WILL ADD A POW BUTTON ON THE YOUTUBE PLAYER BY WHICH YOU CAN CHANGE THE GRAPHICS OF VIDEO



step1: open youtube
step2: type "doge meme" in the search box
step3: press enter
AND SEE WHATS HAPPEN

0 comments:

CSE310 PROGRAMMING IN JAVA

1:37 PM 0 Comments

0 comments:

CSE316 OPERATING SYSTEM

1:36 PM 0 Comments


SESSION 2013-2014


CSE316: OPERATING SYSTEM CONCEPT
Time Allowed: 03:00 hrs                                                                                           Max. Marks: 100  
PART A
   
Q1 (a) Give an abstract view of components of a computer system.
(b) Job of Security is to defend a system from external and internal attacks. Comment?
(c) Differentiate between preemptive and non-preemptive scheduling?
(d) What is busy waiting?
(e) What is Difference between Deadlock avoidance and Deadlock prevention?
(f) List the names of attributes which are helpful in identifying files.
(g) What do you mean by Dynamic Linking and Dynamic Loading?
(h) What are the solution of external fragmentation?
(i) What are two limitation of using pipes in IPC?
(j) What do you mean by file descriptors?

PART B

 Q2 (a) Explain the methods through which the user interacts with the operating systems?
OR
(b) What do you mean by operating system? Explain the structure of various operating systems.

Q3 (a) Write a program for listing all environment variables.
OR
(b) Explain Memory Layout of C program with Suitable Examples.

Q4(a) Consider a following Page String : 1,2,4,3,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6
How many page fault would occur for the LRU Replacement algorithm assuming two, three frames? Initially all frames are empty.
OR
(b) Compare paging with segmentation with respect to the amount of memory required by the address translation structures in order to convert virtual addresses to physical addresses.

Q5 (a) In almost every case many files are stored on the same disk. The main problem is how to allocate space to these files so that the disk space utilized effectively and files can be access quickly. Discuss the methods along with its advantage and disadvantages in details.
OR
(b) (i) What is seek time? Why rotation latency is usually not considered in disk scheduling?
(ii) Except FCFS, none of the disk scheduling discipline is truly fair (starvation may occur) explain why this assertion is true. Also explain why fairness is an important goal in time sharing system.

Q6 (a) Write a short note on following: 
(i) Named Pipes
(ii) Pipes
(iii) popen and pclose

OR
(b) The parent process passes the data or message to child process using the method of IPC. Explain which method is used for this type of communication along with an example.

--End of Question Paper--

SESSION- 2014-2015
CSE316: OPERATING SYSTEM CONCEPT

Time Allowed: 03:00 hrs                                                                                           Max. Marks: 100  

PART A

Q1 (a) What is a system call?
(b) What are the different states in which a process resides until its execution is completed?
(c) What is context switching?
(d) What is role of long term scheduler?
(e) What are environment variable?
(f) What is dynamic memory allocation?
(g) How deadlocks are different from starvation?
(h) Draw the wait-for-graph corresponding to this resource allocation graph. Find out whether there is       is a deadlock or not?


(i) What is the deference between logical and physical address?
(j) What do you mean by external fragmentation?
PART B

 Q2 (a) List five services provided by an operating system. Explain how each provides convenience               to the users. Explain also in which cases it would be impossible for user-level programs to                   provide these services.
OR
(b) What are difference between user level thread and kernel level threads? Under what                             circumstances is one type better than the other?

Q3 (a) Consider the following scenario of five processes with priority, burst and Arrival Time                        Calculate average waiting time and average turn around time by showing Gantt-Charts for
           Process                          Priority                          Burst time                          Arrival Time
             P1                                        10                                       3                            0
             P2                                        3                                         1                            5
             P3                                        2                                         3                            2
             P4                                        1                                         5                            3
             P5                                        5                                         2                            1
           i. Priority scheduling with PREEMPTIVE.
           ii. Priority scheduling without PREEMPTIVE.
OR
(b)  i) Explain the differences with diagram between multilevel queue and multilevel feedback queue       scheduling.
ii) Explain with example how the behavior variate when the time quantum for round robin scheduling is large or small. 

Q4(a) Explain Banker's algorithm or deadlock avoidance with multiple instance of a recourse in detail with the help of example.
OR
(b) Explain the following desk scheduling algorithms with the help of an example.
      i) FCFS     ii) SSTF     iii) SCAN

Q5 (a) i) What is virtual memory? How demand paging supports the virtual memory? Explain in detail.
ii) How segmentation supports user view of memory?
OR
(b) Consider the following page reference string: 
1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6
How many page faults would occur for the following page replacement algorithm assuming three as frame size? Remember that all frames are initially empty.
i) LRU replacement
ii) FIFO replacement
iii) Optimal replacement
Q6 (a) Explain all the techniques dealing with inter process communication in detail.

OR
(b) Write a program to show the usage of popen() and pclose(). Discuss with the expected outcome.
--End of Question Paper--


DOWNLOAD STUDY MATERIAL 




0 comments: