Click Here 2 Download

First Copy Your DLL file into C:\WINDOWS\system32

and put all the image files into C:\Program Files Folder Then run the application ....

Labels:

Download Java JDK 1.6.0

0 Comments Posted by Hirushan De Silva at 6:34 PM

DCCN III LAB_2

0 Comments Posted by Hirushan De Silva at 5:32 PM


VARRAY Simple Tutorial (Oracle)

CREATE TYPE prices AS VARRY(10) OF NUMBER (5,2);

CREATE TABLE pricelist(
pno integer,
prices prices)
/

insert into pricelist values(1,prices(10.20,23.30,33.50));

select * from pricelist;

Labels:

#1 Open Notepad and paste this string into it ( without double quotes )

“X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* ”

#2 Save it and as soon as you do your antivirus real time protection should be able to detect it. In case you have disabled the real time protection run a scan for this file.



Labels:

Part A)

CREATE TYPE dept_t;
/

CREATE TYPE emp_t as OBJECT
(
EMPNO char(6),
FIRSTNAME varchar(12),
LASTNAME varchar(15),
WORKDEPT REF dept_t,
SEX char(1),
BIRTHDATE date,
SALARY number(8,2)
)
/

**completing de created dummi type**

CREATE TYPE dept_t as OBJECT
(
DEPTNO char(3),
DEPTNAME varchar(36),
MGRNO REF emp_t,
ADMRDEPT REF dept_t
)
/



--b)

CREATE TABLE OREMP of emp_t
(
constraint empt_pk primary key (EMPNO),
constraint emp_c1 CHECK(FIRSTNAME IS NOT NULL),
constraint emp_c2 CHECK(LASTNAME IS NOT NULL)
)
/

ALTER TABLE OREMP ADD CONSTRAINT empt_fk FOREIGN KEY(WORKDEPT) references ORDEPT;


CREATE TABLE ORDEPT of dept_t
(
constraint dept_pk primary key (DEPTNO),
constraint dept_c1 CHECK(DEPTNAME IS NOT NULL),
CONSTRAINT dept_fk1 FOREIGN KEY(MGRNO) references OREMP,
CONSTRAINT dept_fk2 FOREIGN KEY(ADMRDEPT) references ORDEPT
)
/

DROP TABLE OREMP;
DROP TABLE ORDEPT;


--c)
insert into OREMP values('000010','CHRISTINE','HAAS',NULL,'F','14-AUG-53',72750);
insert into OREMP values('000020','MICHAEL','THOMPSON',NULL,'M','02-FEB-68',612550);
insert into OREMP values('000030','SALLY','KWAN',NULL,'F','11-MAY-71',58250);
insert into OREMP values('000060','IRVING','STERN',NULL,'M','07-JUL-65',55555);
insert into OREMP values('000070','EVA','PULASKI',NULL,'F','26-MAY-73',56170);
insert into OREMP values('000050','JOHN','GEYER',NULL,'M','15-SEP-55',60175);
insert into OREMP values('000090','EILEEN','HENDERSON',NULL,'F','15-MAY-61',49750);
insert into OREMP values('000100','THEODORE','SPENSER',NULL,'M','18-DEC-76',46150);

insert into ORDEPT values('A00','SPIFFY COMPUTER SERVICE DIV',NULL,NULL);
insert into ORDEPT values('B01','PLANNING',NULL,NULL);
insert into ORDEPT values('C01','INFORMATION CENTRE ',NULL,NULL);
insert into ORDEPT values('D01','DEVELOPEMENT CENTRE',NULL,NULL);

select * from OREMP;
select * from ORDEPT;

update OREMP
SET WORKDEPT = (select ref(D)
from ORDEPT D
where D.DEPTNO ='A00')
WHERE EMPNO='000010';


update OREMP
SET WORKDEPT = (select ref(D)
from ORDEPT D
where D.DEPTNO ='B01')
WHERE EMPNO='000020';


update OREMP
SET WORKDEPT = (select ref(D)
from ORDEPT D
where D.DEPTNO ='C01')
WHERE EMPNO='000030';


update OREMP
SET WORKDEPT = (select ref(D)
from ORDEPT D
where D.DEPTNO ='D01')
WHERE EMPNO='000060';


update OREMP
SET WORKDEPT = (select ref(D)
from ORDEPT D
where D.DEPTNO ='D01')
WHERE EMPNO='000070';


update OREMP
SET WORKDEPT = (select ref(b)
from ORDEPT b
where DEPTNO ='C01')
WHERE EMPNO='000050';


update OREMP
SET WORKDEPT = (select ref(D)
from ORDEPT D
where D.DEPTNO ='B01')
WHERE EMPNO='000090';


update OREMP
SET WORKDEPT = (select ref(D)
from ORDEPT D
where D.DEPTNO ='B01')
WHERE EMPNO='000100';



------------

update ORDEPT
SET MGRNO = (select ref(E)
from OREMP E
where E.EMPNO ='000010')
where DEPTNO ='A00';

update ORDEPT
SET ADMRDEPT =( select ref (E)
from ORDEPT E
where E.DEPTNO ='A00')
WHERE DEPTNO='A00';



update ORDEPT
SET MGRNO = (select ref(E)
from OREMP E
where E.EMPNO ='000020')
where DEPTNO ='B01';

update ORDEPT
SET ADMRDEPT =( select ref (E)
from ORDEPT E
where E.DEPTNO ='A00')
WHERE DEPTNO='B01';



update ORDEPT
SET MGRNO = (select ref(E)
from OREMP E
where E.EMPNO ='000030')
where DEPTNO ='C01';

update ORDEPT
SET ADMRDEPT =( select ref (E)
from ORDEPT E
where E.DEPTNO ='A00')
WHERE DEPTNO='C01';



update ORDEPT
SET MGRNO = (select ref(E)
from OREMP E
where E.EMPNO ='000060')
where DEPTNO ='D01';

update ORDEPT
SET ADMRDEPT =( select ref (E)
from ORDEPT E
where E.DEPTNO ='C01')
WHERE DEPTNO='D01';



--A)
SELECT D.DEPTNAME, D.MGRNO.LASTNAME
FROM ORDEPT D;

--B)
SELECT E.EMPNO, E.LASTNAME, E.WORKDEPT.DEPTNAME
FROM OREMP E;

--C)
SELECT D.DEPTNO, D.DEPTNAME, D.ADMRDEPT.DEPTNAME
FROM ORDEPT D;

--D)
SELECT E.EMPNO, E.FIRSTNAME,E.LASTNAME, E.SALARY, E.WORKDEPT.MGRNO.LASTNAME,E.WORKDEPT.MGRNO.SALARY
FROM OREMP E;

--E)
SELECT E.WORKDEPT.DEPTNO,E.WORKDEPT.DEPTNAME, E.SEX, AVG(E.SALARY)
FROM OREMP E
GROUP BY E.WORKDEPT.DEPTNO,E.WORKDEPT.DEPTNAME,E.SEX;

Labels:




using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Calculator
{
public partial class Form1 : Form
{
private double num1, num2,ans;


public Form1()
{
InitializeComponent();
label4.Text = "0";
radioButton1.Checked = true;

}

private void button1_Click(object sender, EventArgs e)
{
ans = 0;
try
{
num1 = Convert.ToDouble(textBox1.Text);
num2 = Convert.ToDouble(textBox2.Text);
}
catch (Exception er1)
{
MessageBox.Show("Invalid Number!", "Hiru Cal ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

if (radioButton1.Checked == true)
ans = num1 + num2;
else if (radioButton2.Checked == true)
ans = num1 - num2;
else if (radioButton3.Checked == true)
{
try
{
ans = num1 / num2;
}
catch (DivideByZeroException err)
{
MessageBox.Show("ERRor"+err, "Hiru Cal ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error);
};
}
else if (radioButton4.Checked == true)
ans = num1 * num2;

label4.Text = ans.ToString();

}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
}


}
}


DOWNLOAD C# Calculator

Labels:

Part 1:

SELECT DISTINCT c.name,s.company,s.price,s.dividend,s.eps
FROM client c,stock s,purchase p
WHERE c.clno=p.clno AND s.company=p.company
ORDER BY c.name
;

Part 2:
SELECT c.name,p.company,sum(p.qty) as TOTAL_QTY,sum(p.qty*p.price)/sum(p.qty)as APP
FROM client c,purchase p,stock s
WHERE c.clno=p.clno AND s.company=p.company
GROUP BY p.company,c.name
ORDER BY c.name
;

Part 3:
SELECT p.company,c.name,sum(p.qty) as TOT_QTY,sum(p.qty*s.price) as Current_value
From trading t,stock s,client c,purchase p
Where t.exchange='New York' AND s.company=t.company AND c.clno=p.clno AND p.company=s.company
Group by p.company,c.name
Order by p.company
;

Part 4:

client name,purchase*qty

SELECT c.name,sum(p.qty*p.price)AS TOTAL_PRICE
FROM client c,purchase p
WHERE c.clno=p.clno
GROUP BY c.name
ORDER BY c.name
;

Party 5:

SELECT c.name,sum(p.qty*s.price)-sum(p.qty*p.price) as Book_Profit
FROM client c,stock s,purchase p
WHERE c.clno=p.clno AND s.company=p.company
GROUP BY c.name
ORDER BY c.name
;

Labels:

CREATE table client (
clno char(3)NOT NULL,
name varchar(12),
address varchar(30),
CONSTRAINT client_pk PRIMARY KEY(clno));

CREATE table stock(
company char(7),
price number(6,2),
dividend number(4,2),
eps number(4,2),
CONSTRAINT pk_stock PRIMARY KEY(company));

CREATE table trading(
company char(7),
exchange varchar(12),
CONSTRAINT pk_trading PRIMARY KEY(company,exchange),
CONSTRAINT fk_tra_stock FOREIGN KEY(company) REFERENCES stock(company));

CREATE table purchase(
clno char(3),
company char(7),
pdate date,
qty number(6),
price number(6,2),
CONSTRAINT pk_purchase PRIMARY KEY(clno,company,pdate),
CONSTRAINT fk_pur_tra FOREIGN KEY(company) REFERENCES stock(company),
CONSTRAINT fk_pur_clie FOREIGN KEY(clno) REFERENCES client(clno));


insert into client values('c01','John Smith','3 East Av Bentley WA 6102');
insert into client values('c02','Jill Brody','42 Bent St Perth WA 6001');

insert into stock values('BHP',10.50,1.50,3.20);
insert into stock values('IBM',70.00,4.25,10.00);
insert into stock values('INTEL',76.50,5.00,12.40);
insert into stock values('FORD',40.00,2.00,8.50);
insert into stock values('GM',60.00,2.50,9.20);
insert into stock values('INFOSYS',45.00,3.00,7.80);


insert into trading values('BHP','Sydney');
insert into trading values('BHP','New York');
insert into trading values('IBM','New York');
insert into trading values('IBM','London');
insert into trading values('IBM','Tokyo');
insert into trading values('INTEL','New York');
insert into trading values('INTEL','London');
insert into trading values('FORD','New York');
insert into trading values('GM','New York');
insert into trading values('INFOSYS','New York');

insert into purchase values('c01','BHP','02/OCT/01',1000,12.00);
insert into purchase values('c01','BHP','08/JUN/02',2000,10.50);
insert into purchase values('c01','IBM','12/FEB/00',500,58.00);
insert into purchase values('c01','IBM','10/APR/01',1200,65.00);
insert into purchase values('c01','INFOSYS','11/AUG/01',1000,64.00);

insert into purchase values('c02','INTEL','30/JAN/00',300,35.00);
insert into purchase values('c02','INTEL','30/JAN/01',400,54.00);
insert into purchase values('c02','INTEL','02/OCT/01',200,60.00);
insert into purchase values('c02','FORD','05/OCT/99',300,40.00);
insert into purchase values('c02','GM','12/DEC/00',500,55.50);

Labels:

Download Oracle 10g Express

0 Comments Posted by Hirushan De Silva at 6:35 AM



Download Oracle 10g Express
Step 1:
Click Accept
Step 2:
OracleXE.exe
Step 3:
username- g777444@bsnow.net
password- hirushan
Step 4:
install ...while installing give any password u like
Step 5:
start->all programs->oracle database 10g express->Run sql command line
Step 6:
sql>connect system/yourpassword
Step 7:
When yow want to copy something into the prompt Right Click Blue Menu Bar ->edit->paste

Labels: