Friday 29 March 2019

Cloud final assessment

1)Strategic benefitof cloud
Ans:Speed of completion
2)command to get Azure published stings file
Ans:Get-AzurePublishSettingsFile
3)Command to generate client certu
Ans: makecert -sky exchange…
4)Security parameters provided by azure
Ans:Both a and b
5)Storage class for long term archive storage
Ans: glacier
6)file size range in s3
Ans: 0-5tb
7)what do ttl settings control
Ans: determines the amount of time for specific…
8)How many languages supported by cloud search
Ans: 34
9)types of files windows azure storage BLOB contain
Ans: video/image/audio,VHD…
10)Types of storage that you can have with storage account
Ans: tables,blobs,queus
11)Which of these is a cloud deployment model
Ans: ALL of the above
12)When is cloud computing not a suitable option for organizations
Ans: Both A and B
13)Cloud computing is potentially suitable for
Ans: all of the above
14)Intended user for IaaS
Ans: IT professional
15)Different delivery methods available while creating CDN
Ans: Both 1 and 2
16)data format in s3
Ans: objects/files
17)Identify Storage classes in s3
Ans: all of the above
18) where are the steps to generate a self-signed root certificate available
Ans: at the bottom of help option
*19) underlying concept of CDN
Ans: place the content geographically nearest…
20) what server side encryption is available when uploading content to s3 bucktes
Ans: AES-256
21) when using a storage account what are main three ways to
Ans: tables, queues, blobs


Methods and tools


Methods and tools solution set(85/100)
1. Configuration files tracked using VCS
True
2. Best approach for estimation
A combination of all
3. Agile manifesto
Individual and interaction over process and tools
4. Communication between Jenkin and build agent
Bidirectional
5. report shows aggregate status in Jenkin
Weather
6. Continuous integration tool
Jenkins
7. Project health sunny 80% above
True
8. Not a characteristic of good user story
Negotiable
9.Pipeline are now replacing traditional
Production
10.automated testing tool
Selenium
11.unit of measurement size of user story
Story points
12. devOps encourage productivity and efficiency
True
13. What is pipeline
Stages that app goes when developed
14. Analysis to determine quality of code
Static code
15.Timeboxed means
Fixed
16. Different types of projects Jenkins
All of options
17.testing assesses system or solutions
System
18. Multiple changes across several files grouped
Version control
19.spike testing is
Performance
20. Plugin for code repository management
Source code management

Thursday 21 March 2019

AZURE HANDSON

////////// HANDS-ON 1 /////////////////

1) az network vnet create -g resourceaddressgiveninkatacoda -n myvnet

2) az network vnet delete -g resourceaddressgiveninkatacoda -n myvnet

////////// HANDS-ON 2 /////////////////

1) az network nsg create -g resourceaddressgiveninkatacoda -n mynetworknsg

2) az network nsg delete -g resourceaddressgiveninkatacoda -n mynetworknsg


////////// HANDS-ON 3 /////////////////

start writing from step 3:-

1) STORAGEACCT=$(az storage account create --resource-group "resourceaddressgiveninkatacoda" --name "mystorageacct17" --location eastus --sku Standard_LRS --query "name" | tr -d '"')

2) STORAGEKEY=$(az storage account keys list  --resource-group "resourceaddressgiveninkatacoda"  --account-name $STORAGEACCT  --query "[0].value" | tr -d '"')

3) az storage share create --account-name $STORAGEACCT  --account-key $STORAGEKEY  --name "myshare"

4) az storage directory create --account-name $STORAGEACCT --account-key $STORAGEKEY --share-name "myshare" --name "myDirectory"

5) az storage file upload --account-name $STORAGEACCT --account-key $STORAGEKEY --share-name "myshare" --source "/home/scrapbook/tutorial/php-docs-hello-world/index.php" --path "myDirectory/index.php"

////////// HANDS-ON 4 ////////////////////

1) az vm create -n myvm -g resourceaddressgiveninkatacoda --admin-username gaurav --image UbuntuLTS --generate-ssh-keys

2) az vm delete -g resourceaddressgiveninkatacoda -n myvm 

Wednesday 20 March 2019

Agile quiz


Agile - Quiz

1) Product owner
2) It is used to measure how much work is left to be done
3) The consistency reduces complexity and overhead
4) You cannot say anything for sure
5) Planning should involve the whole team

Monday 18 March 2019

GIT HANDS-ON

Merge handson
Step1
git branch
git checkout feature1

Step2
git checkout master
git merge feature1

Step3
git checkout feature2
git checkout master
git merge feature2

Step4
git status

Step5
git commit -a
In vim file write
status and commit the changes

Step6
git branch -d feature1
git branch -d feature2

Undoing changes handson

Step1
git log --oneline
cat hello.py

In vim write
print("Hello World")
git commit -am "updated print statement"


Step2
git diff HEAD
git checkout hello.py

Step3
git status
git diff --cached
git reset

Step4
git status
git reset --hard HEAD

Step5
git reset HEAD~1
git commit -am "commit to revert"
git log --oneline
git show HEAD
git revert HEAD

Step 6
git revert HEAD...HEAD~3 --no-edit
cat hello.py
git log --oneline
2nd handson
Step 1:
ls
git init
Step2:
git remote add origun /s/remote-repo
git remote -v

Step3
git push origin master

Step4
git pull origin master

Step5
git clone <url>

1st handson
Step3:
git add hello-world.js
Step4:
git commit -m "commit message"
Step5:
touch .gitignore
git add .gitignore


REBASE

    git clone /s/remote-project/chceknumber

    cd checkNumber

    cat check_number.py

    sed -i -e "\$aelse: \n print('{0} is Odd'.format(num))" check_number.py

    sed -i '1s/^.*$/#Checks whether number 4 is even or odd/' check_number.py

    cat check_number.py

    git add check_number.py

    git commit -m "<message>"

    git fetch origin master

    git diff master origin/master

    git pull --rebase origin master

    vim check_number.py

    >>#Read......or odd    //delete everything else from <<<<<HEAD to #blue comment

    git add check_number.py

    git rebase --continue

    git log

    git push origin master

Thursday 14 March 2019

OPS_RIO

Operations

Rio quiz

1.Discipline in execution+pursuit of excellnce+customer experience
2.consistent+proactive risk management,discipline or behaviour,operations excellence
3.prompt handling of all changes......
4.break glass
5.all of the above options

marks:(4/5)
45/50 with these answers in Ops_RiO final assessment
1. Means of production
2. Ruby
3. Shift management  (2005 texas city)
4. Project oath (support engineer)
5. Recipies (object used by chef)
6. Ansible (not puppet)
7. Test kitchen (chef Dev kit for ruby)
8. Business continuity plan (earthquake)
9. Right combination of technical and inter personnel skills
10. RCA requires... (woolworth supermarket)


Rio final quiz
1) It automation :- All of the above
2) Expectations of TCSer :- End to end
3) TCS opn day:- 24th july
4) Ron :- Ron should hv tested the script in pre production
5) Not an automation tool:- VR
6) Main obj of rio :- break free
7) Earthquake :- Buisness
8) Google :- kubernate
9) Saas platform :- Datadog
10) Software platform for VM :- Vagrant
11. Means of production
12. Ruby
13. Shift management  (2005 texas city)
14. Project oath (support engineer)
15. Recipies (object used by chef)
16. Ansible (not puppet)
17. Test kitchen (chef Dev kit for ruby)
18. Business continuity plan (earthquake)
19. Right combination of technical and inter personnel skills
20. RCA requires... (woolworth supermarket)

Monday 11 March 2019

FINAL QUIZ DBMS SOFTWARE FOUNDATION PHASE 5

FINAL QUIZ DBMS SOFTWARE FOUNDATION PHASE 5
1. which among the following is a correct Syntax for raising the user defined exception
handlers?
- Both 1 and 2
2. Which SQL statement returns a numeric value?
- SELECT sysdate-hire_date FROM EMP;
3. when does the for loop terminate?
- When the index reaches the UPPER bound or is terminated early using EXIT statement
4. Table structure:
EmpID | EmpName | ProjId | MNGR-Id | Location | Designation
.
.
.
By referring to the above table structure, for which of the below questions, we would
require to apply the concept of SubQuery?
- All
5. Select an appropriate option for a ‘FUNCTION’ in PLSQL.
- Function can return result value.
6. The ____________ contains a set of tables and views that Oracle use as a reference to the
database
- Data Dictionary
7. What are defined as exceptions in PL/SQL?
- Run time errors
8. From the below table:
EmpId | EmpNAme | ProjId | ProjName | No.OfHoursWorked

What are the probable and decomposed tables after performing second normal form?
Let us assume that…..
- Table1:
EmpId | EmpName
Table2:
ProjId | ProjName
Table3:
EmpId | ProjId | No.OfHoursWorked
9. From the below table …….. What would be the primary key to get unique record from the
table? (Pls Confirm)
- EmpID and ProjId together
10. A column with regerence to a record in a table should not have multiple values.
Which normal form, Talks about the above statement?
- First
11. DELETE * FROM STUDENT
What will be the output?
- Deletes all rows from STUDENT table
12. What are the complications, when as exception occurs?
- All of these.
13. The formal classifications describing the level of database normalization in a model are
called normal forms.
- TRUE
14. We can use Transaction control statements in database triggers
- False
15. Select the suitable option from below to create an index on “job” column in emp table?
- Create index emp_ind on emp(job);
16. Which of the statements helps in terminating the PL/SQL LOOP?
- EXIT WHEN
17. Database trigger can be fired when the table is TRUNCATED?
- False
18. Types of SQL statements
- TCL
- DDL
- DML
19. In the below table:
EmpID | EmpName | ProjId
.
.
.
By referring the above table, Select a suitable query which gets all employees whose
project is same as project of ‘d’?
- SELECT * FROM EMP WHERE ProjId=(SELECT ProjId FROM EMP WHERE EMPNAME=’d’)
20. On which of the below statements, acts as trigger firing events?
- All of these
21. We can enable or disable a database trigger
- True
22. Which is the below statement is used to remove access or privileges on database object to
users?
- Revoke
23. A stored function will not allow any parameter to be passed
- False
24. DCL Commands are used to enforce database security in a multiple user environment
- True
25. DDL commands
- CREATE
- ALTER
- DROP
26. Which is the correct syntax for handling Exception handlers?
- WHEN ex_name THEN stmt
27. Which of the below constraints will make sure to allow, only the values of a column (in a
master) to the respective column of a child table?
- Foreign key
28. What does TRUNCATE statement do?
- Remove all rows from a table
29. Select the suitable statement for PLSQL
- Bringing Programming language features to SQL
30. Which of the following is true with respect to Referential Integrity?
- Every foreign key value must match primary key value in the associated table ie
Parent table
31. What is the grant statement to grant select, insert, delete privileges on table: Emp to user:
TestUser?
- Grant Select, Insert, Delete on Emp to TestUser
32. Table 1 : Emp
EmpId | EmpName | ProjId

Table2: Proj
ProjId | ProjName

By referring to the above table structure, select the query which would Fetch EMPID,
EMPNAME, ProjId, ProjName for each employee?
- Select A.EmpID, A.EmpNAme, A.ProjId, B.ProjName from EMP A, Proj B WHERE
A.ProjID = B.ProjID
33. Select the suitable option for SubQuery
- Inner query executes first…
34. Which Prefixes are available to Oracle triggers?
- Both :new and :old
35. Evaluate the set of SQL statements: CREATE TABLE dept(dept_id NUMBER(2) dname
VARCHAR2(14), Loc VARCHAR2(13)); ROLLBACK; DESCRIBE DEPT. What is true about the
set?
- The DESCRIBE DEPT statement displays the structure of the DEPT table

Saturday 9 March 2019

DBMS FINAL HANDS ON


PL SQL FINAL HACKERRANK CODE ASSESSMENT

1)
SET SERVEROUTPUT ON;

DECLARE
    CURSOR C1 IS SELECT * FROM EMPLOYEES;
    E EMPLOYEES%ROWTYPE;
    GRADE VARCHAR2(40);
BEGIN
    OPEN C1;
    LOOP
        FETCH C1 INTO E;
        EXIT WHEN C1%NOTFOUND;
        IF ( E.SALARY >= 30000 ) THEN
            GRADE := 'Senior manager';
        ELSIF ( E.SALARY >= 25000 ) THEN
            GRADE := 'Middle manager';
        ELSIF ( E.SALARY >= 20000 ) THEN
            GRADE := 'Junior manager';
        ELSE
            GRADE := 'Team member';
        END IF;

        dbmsoutput.putline(E.NAME || ' ' || GRADE);
    END LOOP;
END;
/


2)
SET SERVEROUTPUT ON;

DECLARE
    CURSOR C1 IS SELECT * FROM SCORES WHERE SCORE < 100;
    LINE SCORES%ROWTYPE;
    total NUMBER := 0;
    num NUMBER;
    flag NUMBER;

BEGIN
    OPEN C1;
    LOOP
        flag :=1;
        FETCH C1 INTO LINE;
        EXIT WHEN C1%NOTFOUND;
        num := LINE.SCORE;
        FOR i IN 2..sqrt(num)
        LOOP
            IF ( mod(num, i) = 0 ) THEN
                flag := 0;
                exit;
            END IF;
        END LOOP;
        IF ( flag=1 ) THEN
            total := total + LINE.SCORE;
        END IF;
    END LOOP;
    dbmsoutput.putline('Total=' || total);
END;
/


SQL CODE ASSESSMENT

1) DEPARTMENT WHIHC DOES NOT CONTAIN PROGRAMMER POEPLE

SELECT DISTINCT D.DEPTNAME FROM EMPLOYEES E JOIN DEPARTMENTS D ON E.DEPTID=D.DEPTID WHERE E.DEPTID NOT IN (SELECT E.DEPTID FROM EMPLOYEES E JOIN DEPARTMENTS D ON E.DEPTID=D.DEPTID WHERE E.EMPSKILL LIKE 'Programmer');

2) SOME OTHER QUESTION

SELECT DISTINCT D.DEPTNAME, E.EMPSKILL FROM EMPLOYEES E JOIN DEPARTMENTS D ON E.DEPTID = D.DEPTID;

Tuesday 5 March 2019

INFORMATION MANAGEMENT AND INTEGRATION

INFORMATION MANAGEMENT AND INTEGRATION
REACT API
SKILLSOFT SOLUfTION:
1. Promote self contained components, merges js and html
2. Npm
3. Connect()
4. Rendered in js, added to projects
5. Render()
6. {This.props.heading}
7. Gruntfile, package json
8. Install grunt init
Install gruntplugin template
Run gruntinit gruntplugin in an empty directory
Run npm install

META DATA MANAGEMENT
SKILLSOFT SOLUTION:

PART 1
1. To connect to external  data sources
2. STORE customer INTO customer. Qvd;
3. LOAD * FROam product.qvd(qvd);
4. Mapping load
5. It's a third party, installed locally
6. Supports incremental loading, supports confirmed dimensions, reuse of extraction data

PART 2
1. XML
2. Server, complexity, lineage, objects
3. Descriptive, structural, administrative
4. It improves security of data, accuracy of data, increases consistency of data
5. Turnof basic metadata collection for server, avoid complex metadata creation processes, use a practical and pragmatic methodology
6. Tag field #measure with '$measure's, '$numeric';
7. RENAME = fields using rename_ mapping;
8. To many configuration of data governance dashboard
9. All except 'go accept independent  user driven method'

DATA ANALYTICS
SKILLSOFT SOLUTION:
1. Data source accuracy
2. SQL uses ss
3. Information is organized data and info stems from data
4. Create
5. The design  can be used to generate a db structure
6. TOGAF
7. PCI DSS
8. Clustered db analytical enginer
9. Each item can store different types of data and Dynamo db is a no SQL solution
10. 1433
11. ACL

DATA GOVERNANCE
SKILLSOFT SOLUTION:
1. The way in which it's used
2. Behavior
3. Domain
4. Access your data
5. Skills
6. Data
7. Tools
8. Expect a mix of technical and business expertise
9. 60% up time
10. A better understanding of behavior
11. Isolate different types
Information management – final quiz
1) What are the Benefits of using ELT process in QlikView?
Ans: Reuse data, support conformed dimension, support incremental loading
2) What is success status code?
Ans: 201
3) You are extracting data from customer table and store
Ans: STORE customer INTO customer.qvd;
4) You want to tag #measure field in your data with $measure and $numeric tags
Ans: TAG Field #measure With ‘measure’,’$numeric’;
5) Data Governance Dashboard tabs:
Ans: Server, Lineage, Objects, Complexity
6) To transform your sales data and map
Ans: Mapping LOAD
7) Identify whether the following statement is true or false. A URN can be a URL, and both are always URIs
Ans: True
8) An info governance program can’t be implemented without IT
Ans: Planning collaborately with IT early in process
9) Communication are point to point and randomized in governance
Ans: True
10) Having successfully extracted and transformed data
Ans: LOAD * FROM product.qvd (QVD);
11) What are the characteristics of Governance?
Ans: consistency, accuracy, security
12) Which of the following is not valid REST method
Ans: UPDATE
13) Which Statement accurately describes QlikView?
Ans: third party tool, installed locally
14) Which statement accurately describes primary purpose of QlikView Database?
Ans: To connect to external data sources
15) Which definition best describes power of data analytics:
Ans:
16) In fetch method of using API, response must be returned before use (T/F)
Ans: True
17) Finding critical data is critical to analyst not a great way to accomplish
Ans:
18) What is pattern frequency in Data Analytics:
Ans: Finding Reoccurring Transactional data
19) We can get to know whether the given app is built on developer tool chrome tab named as React (T/F)
Ans: True
20) Basic info of data governance includes all except:
Ans:
21) Biggest advantage of using Axios:
Ans: it enables automatic transformation of JSON data
22) Which two statement apply to analytics of risk decision:
Ans:
23) What is the use of OPTIONS request?
Ans:
24) Which of the following is correct? (JSON)
Ans: We can use JSON data directly in axios
25) Which request is triggered on refresh, forward/backward?
Ans: Get
26) What is one of the surprising but effective way of info governance?
Ans: Choose an integral rank-and-file employee and profile their world before and after implementing information governance.
27) What is the first thing you check on building data query:
Ans: Workflow diagrams
28) PUT can be used to modify collection of resources :( T/F)
Ans: True
29) Which of the following is not true when pasting chart in PowerPoint:
Ans: It pastes as an image
30) What is major function of data analytics?
Ans:
31) Identify whether the following statement is true or false. PUT can be used to modify collection of resources.
Ans: TRUE
32) What is the significance of status code – 405?
Ans: Method not allowed
33) What use “PUT” call in an API to
Ans: Update data
34) Finding existing data is critical to an Analyst. What is not a great way to accomplish this?
Ans: Start Completely Scratch
35) The standard referred to predict both form and content in Meta data is
Ans: Federal Geographic Data Committee
36) Which definition best describes the true power of data analytics
Ans: Produces automated decision making
37) What is the major functions of data analytics?
Ans: Building dashboards, Automated decision making, Data Visualization
38) Which of the following command will be used to create React project named as “MyApp”?
Ans: create-react-app MyAPP
39) When considering the next step after identifying information governance problem in the enterprise, it’s best to turn those into actionable projects…
Ans: as quickly as u can
40) Which request can be used to work with collection of resources?
Ans: Patch
41) What is Axios?
Ans: A promise based HDP library to make API call.
42) Which statement accurately describes the primary purpose of using profiles in the Data Governance Dashboard?
Ans: To manage the Organizations extract, transform and load process
43) We can “POST” call for
Ans:  add new data
44) Best practices in the management of data is known as Data Governance?
Ans: it increases consistency of data, it improves accuracy of data, it improves security of data.
45) Which command is used to start the React project after the required dependency installed?
Ans: $npm start
46) RESTful API work on which protocol?
Ans: HTTP
47) When working with data sets that are built for us, they may often have _____________ Data
Ans: Redundant
48) Which two statements apply to the analytics of risk decisions?
Ans: Compare against regional and local economic data, collects sales and inventory transactions
49) Data Analysts engage in all of the following activities except
Ans: Changing data values
50) When collecting and managing metadata, which statement accurately describe the best approach?
Ans: Turn off basic metadata collection for server, use a practical and pragmatic methodology, avoid complex metadata creation processes
51) A decision making monitoring and enforcement body that has authority over data management is called ___________
Ans: Data governance
52) What is the command used for installing axios?
Ans: npm install –save axios
53) Creating a formal governance plan or document is an unnecessary part of getting an information governance program off the ground.
Ans: False
54) What is the status code returned when a new resource is created by POST request?
Ans: 201
55) Point out the correct statement.
Ans: Raw data is original source of data
56) Valued metadata elements in the FGDC metadata content standard take the form:
Ans: Element_Name: Element Type






Monday 4 March 2019

DBMS Handson

DDL HANDSON
create table Department (dept_id number(10),dept_name varchar(20));
Press continue
alter table Department add Location varchar(20);

Press continue
drop table Department;

DQL HANDS ON

Step 1: click on the commands given side
step 2: select DEPT_NAME
              from department
              where DEPT_ID = 100;


DML HANDSON

Step 1: insert into Employee values(1,'AAA',20000,100);
Insert into Employee values(2,'BBB',30000,200);
insert into Employee values(3,'CCC',30000,300);
commit;
STEP 2: update Department set DEPT_NAME='FINANCE' where DEPT_ID=100;
commit;


Constraints hands on

alter table department add constraint dept_id primary key (dept_id);
alter table employee add foreign key (dept_id) references department (dept_id);

*5. Joins hands-on*

Step 1:
Simply enter User name and password

Step 2:
Select SALARY
from Employee, department
where DEPT_NAME = 'IT'
and Employee.DEPT_ID = department.DEPT_ID;

Step 3:
Select DEPT_NAME
from department
where DEPT_ID = (select DEPT_ID from
(Select DEPT_ID, count(DEPT_ID)
from Employee
group by DEPT_ID
order by 2 desc) where rownum = 1);p
----------------
PL/SQL
SET SERVEROUTPUT ON
DECLARE
    i NUMBER(3);
    j NUMBER(3);
   s NUMBER(3);
BEGIN
    s := 0;
    i := 2;
    LOOP
        j := 2;
        LOOP
            EXIT WHEN( ( MOD(i, j) = 0 )
                        OR ( j = i ) );
            j := j + 1;
        END LOOP;
        IF( j = i )THEN
           s := s + I;       
        END IF;
        i := i + 1;
        exit WHEN i = 30;
    END LOOP;
   dbms_output.Put(s||'   ');
 dbms_output.new_line;
END;
/

CURSORS
SET SERVEROUTPUT ON
DECLARE
    s NUMBER(3);
    CURSOR employee_cur IS
      SELECT salary
      FROM   Employee;
BEGIN
    s := 0;
    FOR employee_rec IN employee_cur LOOP
        IF employee_rec.salary < 50000 THEN
          s := s + 1;
        END IF;
    END LOOP;
 dbms_output.Put(s||'   ');
dbms_output.new_line;
END;
/


IamAnarchy:
PL/SQL:
SET SERVEROUTPUT ON
DECLARE
    i NUMBER(3);
    j NUMBER(3);
   s NUMBER(3);
BEGIN
    s := 0;
    i := 2;
    LOOP
        j := 2;
        LOOP
            EXIT WHEN( ( MOD(i, j) = 0 )
                        OR ( j = i ) );
            j := j + 1;
        END LOOP;
        IF( j = i )THEN
           s := s + I;         
        END IF;
        i := i + 1;
        exit WHEN i = 30;
    END LOOP;
   dbms_output.Put(s||'   ');
 dbms_output.new_line;
END;
/

CURSORS:
SET SERVEROUTPUT ON
DECLARE 
s NUMBER(3);
 c_salary Employee.salary%type;
CURSOR c_employee is 
      SELECT salary FROM Employee; 
BEGIN 
s := 0;
   OPEN c_employee; 
   LOOP 
      FETCH c_employee into c_salary; 
      EXIT WHEN c_employee%notfound; 
     IF c_salary < 50000 THEN
          s := s + 1;
        END IF;
   END LOOP; 
 dbms_output.put_line(s || ' '); 
   CLOSE c_employee; 
END; 
/

AVERAGE:
create or replace function findAverage(a number,b number,c number)
return number
as out number;
begin
 out := a+b+c;
 out := out/3;
 return out;
end;
/

DBMS

INTRO TO DBMS QUIZ
1.cardinity
2.many to many
3.eliminating
4.primary key value must be unique and primary key values must not change
5.each table column should contain a unique value and each record needs to be unique
-----------------
Sql type quiz ans
Defferable
Drop,rename,add,modify
All of these
Datatype constraint
Truncate
---------------
Database constraints quiz
Alter table drop constraint
Check(budget>=0)
Not null
All of these
Select constraint_name,constraint_type from user_constraints where table name=“
-------------------
Functions in SQL Quiz

* Group By
* Total
* Count
* Count(*)
* Having
----------------------
SQL Joins
*FALSE
*Super key
*Relational database system (most useful database model)
*Relational database system
Primary key(unique)
-----------------------
DB objects
1). Nextval
2)Sequences
3)Create fulltext index and system stored procedures
4)two
5)none of these
---------------------
Sql cursors
1)true
2)false(cursor declared at beginning)
3)cursor
4)exit when Sql %notfound
5)none of these
-------------------------
 Exception handling
1)true
2)0
3)sqlcode
4)calling environment
5)at the end
 Stored procedures
1)all the above
2)all the above
3)an execution of a specific procedure
4)false
5)return varchar2
---------------------
 Sql blocks
1)all of these
2)return varchar2(function header)
3)return(function body)
4)false(function can return more than one value)
5)true(function can be used)

Sunday 3 March 2019

UNIX CODES

UNIX - FindDepartmentEmployeeCount

#!/bin/bash
#write your code here
if [ $# -ne 2 ]
then
echo "Pass appropriate number of command line arguments"
elif [ -d $1 ]
then
echo "Input file is not an ordinary file"

elif [ ! -f $1 ]
then
echo "Input file does not exists"
elif [ ! -r $1 ]
then
echo "Input file does not have read permission"
else
grep -i $2 $1 | wc -l
fi

UNIX - CountWords

#!/bin/bash
#write your code here
if [ $# -ne 2 ]
then
echo "Pass appropriate number of command line arguments"
elif [ -d $1 ]
then
echo "Input file is not an ordinary file"
elif [ ! -f $1 ]
then
echo "Input file does not exists"
elif [ ! -r $1 ]
then
echo "Input file does not have read permission"
else
grep -i $2 $1 | wc -l
fi

UNIX - COUNT EMPTY FILES

j=0
k=0
count=0
total=0
for i in $@
do
if [ -s $i ]
then
count=`wc -w $i|cut -d ' ' -f 1`
let total=$count+$total
let k=$k+1
else
let j=$j+1
fi
done
echo $

UNIX - STUDENTS RECORDS


UN IX-AVREAGE SALARY
sum=0
count=0
firstLine=0
found=0

if [ $# -ne 2 ] ; then
echo "Pass appropriate number of command line arguments"
elif [ -d $1 ]; then
echo "Input file is not an ordinary file"
elif [ ! -f $1 ] ; then
echo "Input file does not exist"
elif [ ! -r $1 ]; then
echo "Input file does not have read permission"
else
while read -r line; do
if [ $firstLine -eq 0 ] ; then
firstLine=1
else
while IFS=',' read -r a b c; do
if [ $b = $2 ] ; then
found=1
sum="$(($sum + $c))"
count="$(($count + 1))"
fi
done <<< "$line"
fi
done < "$1"
avg="$(($sum / $count))"
if [ $found -eq 0] ; then
echo "Given designation not found"
else
echo $avg
fi
fi


Saturday 2 March 2019

UI codes

Vehicle Registration
<html>
    <head>
         <title>Vehicle Registration</title>
        <script type="text/javascript" scr="index.js" ></script>
    </head>
    <body>
        <form id="registerVehicle" >
            <h1>Motor Vehicle Department of Kerala</h1>
   <hr>
            <div id="registerDiv">
                <h2>Vehicle Registration Form</h2>
            
            <table  id="vehicleForm" style="border:; 1px solid black; width: 80%; text-align: center; background-color:#EF45E0;">
                <tr>
                    <td>Full name of Applicant</td>
                    <td>
                        <input type="text" required id="fullName" />
                        <span id="err1"></span>
                    </td>
                </tr>
                <tr>
                    <td>Age</td>
                    <td>
                        <input type="number" required id="age" />
                        <span id="err2"></span>
                    </td>
                </tr>
                <tr>
                    <td>Permanent Address</td>
                    <td>
                        <textarea required id="address"></textarea>
                        <span id="err3"></span>
                    </td>
                </tr>
                <tr>
                    <td>Contact Phone</td>
                    <td>
                        <input required type="text" id="phone" />
                        <span id="err4"></span>
                    </td>
                </tr>
                <tr>
                    <td>Class of vehicle</td>
                    <td>
                        <select id="vehClass">
                            <option value="Motorcycle With out Gear">Motorcycle With out Gear</option>
                            <option value="Motorcycle With Gear">Motorcycle With Gear</option>
                            <option value="Motor Car">Motor Car</option>
                            <option value="Light Motor Vehicle-Transport">Light Motor Vehicle-Transport</option>
                        </select>
                        <span id="err5"></span>
                    </td>
                </tr>
                <tr>
                    <td>Engine No</td>
                    <td>
                        <input type="number" id="engineNo"/>
                        <span id="err6"></span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <button type="submit" id="register" onclick="validateRegister();">Register</button>
                        <button type="reset" id="cancel">Cancel</button>
                    </td>
                </tr>
            </table>
 </div>
 </form>
  <div id="resultDiv" style="display: none;">   
  <p>An event is created with id = <span id="eid"></span></p>   
  <p>Department :<span id="dep"></span></p>   
  <p>Status :<span id="sta"></span></p>   
  <p>Raised By :<span id="rai"></span></p>   
  <button id="close" onclick="show()">Close</button>   </div>
        
    </body>
</html>

js code:



function validateRegister() {
}

Event Mangement System

<html>
<head>
<title>Event Mangement System</title>
<script type="text/javascript" src="index.js"></script>
<style>
</style>
<head>
<body>
<!-- Design & Develop your code here -->
<center>
<h1>Event Mangement System</h1>
<hr>
<div id="creationDiv">
<form name="createEvent" id="createEvent" method="post" action="index.js" onsubmit="return validateCreation()">
<h2>Event Creation Form</h2>
<table id="eventForm" align="center" width="80%" border="1px solid black" background-color="#FE45E0">
<tbody>
<tr>
<td><label>Event id</label></td>
<td><input type="number" name="eventId" required><span id="err1"></span></td>
</tr>
<tr>
<td><label>Department</label></td>
<td><input type="text" name="department" required><span id="err2"></span></td>
</tr>
<tr>
<td><label>Status</label></td>
<td>
<select name="status" required>
<option value="Open">Open</option>
<option value="In Progress">In Progress</option>
<option value="Rejected">Rejected</option>
<option value="Complete">Complete</option>
</select>
<span id="err3"></span>
</td>
</tr>
<tr>
<td><label>Description</label></td>
<td><input type="textarea" name="description" required><span id="err4"></span></td>
</tr>
<tr>
<td><label>Raised By</label></td>

<td><input type="text" name="raisedBy" required><span id="err5"></span></td>
</tr>
<tr>
<td><label>Contact Phone</label></td>
<td><input type="text" name="contactPhone" required><span id="err6"></span></td>
</tr>
<tr>
<td><button name="create" type="submit" value="create" style="background-color:#2345E4">Create</button></td>
<td><button name="cancel" type="reset" value="cancel" style="background-color:#2345E4">Cancel</button></td>
</tr>
</tbody>
</table>
</form>
<div id="resultDiv"></div>
</div>
</center>
</body>
</html>




index.js:
--------------

function validateCreation(){
var eventId=document.myform.eventId.value;
var department=document.myform.department.value;
var status=document.myform.status.value;
var option = status.options[status.selectedIndex].text;
var description=document.myform.description.value;
var raisedBy=document.myform.raisedBy.value;
var contactPhone=document.myform.contactPhone.value;

  if (eventId===null || eventId===""){
    document.getElementById("err1").innerHTML = "Invalid Entry";
    return false;
  }else if (department===null || department===""){
    document.getElementById("err2").innerHTML = "Invalid Entry";
    return false;
  }else if (status===null || status===""){
    document.getElementById("err3").innerHTML = "Invalid Entry";
    return false;
  }else if (description===null || description===""){
    document.getElementById("err4").innerHTML = "Invalid Entry";
    return false;
  }else if (raisedBy===null || raisedBy===""){
    document.getElementById("err5").innerHTML = "Invalid Entry";
    return false;
  }else if (contactPhone===null || contactPhone===""){
    document.getElementById("err6").innerHTML = "Invalid Entry";
    return false;
  }else {
document.getElementById("resultDiv").innerHTML = "An event is created with event id ="
    + eventId + "<br> Department :"
+ department + "<br> Status :"
+ status + "<br> Raised By :"
+ raisedBy + "<a href="index.html">[Close]</a>";
  }
}



UI - CONTACT MANAGEMENT -

<!DOCTYPE html>
<html>
<head>
    <title>.</title>
    <style>
        table,tr,th,td
        {
            border: 1px solid black;
            border-collapse: collapse;
        }
    </style>
    
    <script>
        function func()
        {
            document.getElementById("message").innerHTML ="Customer Contact Created";
        }
    </script>
</head>

<body>
    <h1 style="text-align: center;">ABC Hotels</h1>
    
    <div id="message" onsubmit="func()">
        <form name="contactCustomer" id="contactCustomer" >
            <table id="contactTable" style="text-align: center;" width="30%" align="center">
            <tr>
            <th>Label</th>
            <th>Control</th>
            <th>Validation</th>
            </tr>
<tr>
<td>Name</td>
<td><input type="text" name="name" placeholder="Customer Name"
maxlength="50" required= ></td>
<td>Mandatory,Max size=50</td>
</tr>
<tr>
<td>Age</td>
<td><input type="text" placeholder="Customer Age" name="age" min="20"
max="65" required></td>
<td>Mandatory,Value range 20-65</td>
</tr>
<tr>
<td>Email</td>
<td><input type="email" name="email" placeholder="Customer Email"></td>
<td>Mandatory,Valid Email</td>
</tr>
<tr>
<td>Address</td>
<td><input type="textarea" name="address" placeholder="Customer Address"></td>
<td>Mandatory</td>
</tr>
<tr>
<td>Phone</td>
<td><input type="text" name="phone" placeholder="Customer Phone"></td>
<td>Mandatory</td>
</tr>
<tr>
<td>Send</td>
<td><input type="submit" name="send" value="send" style="background-color:#fe45e4;" ></td>
<td></td>
</tr>
<tr>
<td>Cancel</td>
<td><input type="reset" name="reset" style="background-color:#fe45e4;"></td>
<td></td>
</tr>
</table>
</form>
</div>
</body>
</html>
UI - GRADE SIMPLE TASK

You have to first write in a .gradle file :-
apply plugin: 'java'
task(runSimple, dependsOn: 'classes', type: JavaExec) {
main = 'prime.java'
classpath = sourceSets.main.runtimeClasspath
}
defaultTasks 'runSimple'

Now in the folder prime.java you need to write the prime number code like that :-
class prime
{
public static void main (String[] args)
{

int i =0;
int num =0;
String prime = "";
for (i = 1; i <= 20; i++)
{
int counter=0;
for(num =i; num>=1; num--)
{
if(i%num==0)
{
counter = counter + 1;
}
}
if (counter ==2)
{
primeNumbers = prime + i + " ";
}
}
System.out.println(prime);
}
}
UI - VEHICLE MANAGEMENT

<html>
<head>
<title>Vehicle Registration</title>
<script type="text/javascript" scr="index.js" > </script>
</head>
<body>
<form id="registerVehicle">
<h1>Motor Vehicle Department of Kerala</h1>
<div id="registerDiv">
<h2>Vehicle Registration Form</h2>
</div>
<table style="border:; 1px solid black; width: 80%; text-align: center;
background-color:#EF45E0;" id="vehicle">
<tr>
<td>Full name of Applicant</td>
<td>
<input type="text" required id="fullName" />
<span id="err1"></span>
</td>
</tr>
<tr>
<td>Age</td>
<td>
<input type="number" required id="age" />
<span id="err2"></span>
</td>
</tr>
<tr>
<td>Permanent Address</td>
<td>
<textarea required id="address"></textarea>
<span id="err3"></span>
</td>
</tr>
<tr>
<td>Contact Phone</td>
<td>
<input required type="text" id="phone" />
<span id="err4"></span>

</td>
</tr>
<tr>
<td>Class of vehicle</td>
<td>
<select id="vehClass">
<option value="Motorcycle With out Gear">Motorcycle With out Gear</option>
<option value="Motorcycle With Gear">Motorcycle With Gear</option>
<option value="Motor Car">Motor Car</option>
<option value="Light Motor Vehicle-Transport">Light Motor Vehicle-Transport</option>
</select>
<span id="err5"></span>
</td>
</tr>
<tr>
<td>Engine No</td>
<td>
<input type="number" id="engineNo"/>
<span id="err6"></span>
</td>
</tr>
<tr>
<td colspan="2">
<button type="submit" id="register">Register</button>
<button type="reset" id="cancel">Cancel</button>
</td>
</tr>
</table>
</form>
<div id="resultDiv">Close</div>
</body>
</html>

Index.js :-

Function validateRegister() {

}

Contact List


<html>
<head>
<script src="index.js"></script>
</head>

<body>
<table id="contactList" border="1px" width="80%:" align="center">
<tr style="background-color:#42aaf4">
<th>Phone No.</th><th>Name</th><th>Gender</th><th>City</th><th>Action</th>
</tr>

<tr>
<td>9874563210</td><td>Akshay Kumar</td><td>Male</td><td>Chennai</td><td><input type="Button" value="delete" onclick="confirmDelete(this)"</td>
</tr>
<tr>
<td>9632587410</td><td>Shyama P</td><td>Female</td><td>Trivandrum</td><td><input type="Button" value="delete" onclick="confirmDelete(this)"</td>
</tr>
<tr>
<td>7896541230</td><td>Nalini Kumari</td><td>Female</td><td>Banglore</td><td><input type="Button" value="delete" onclick="confirmDelete(this)"</td>
</tr>
<tr>
<td>9513571233</td><td>Raj Shyam</td><td>Male</td><td>Chennai</td><td><input type="Button" value="delete" onclick="confirmDelete(this)"</td>
</tr>
<tr>
<td>8745632109</td><td>Sundar G</td><td>Male</td><td>Manglore</td><td><input type="Button" value="delete" onclick="confirmDelete(this)"</td>
</tr>
<tr>
<td>7412580963</td><td>Kishore P</td><td>Male</td><td>Calicut</td><td><input type="Button" value="delete" onclick="confirmDelete(this)"</td>
</tr>
</body>
</html>


Js:
function confirmDelete(o) {
    var retVal = confirm("Do you want to Delete ?");
               if( retVal == true ) {
                  deleteContact(o);
                  return true;
               }
           
 }

function deleteContact(o) {
      var p=o.parentNode.parentNode;
      p.parentNode.removeChild(p);

 }




Hindusthan Liver:
       -----------
<!DOCTYPE html>
<html>
<head>
    <script src="shop.js"></script>
</head>
<body>
    <div id="head"><h1>Hindustan Liver</h1></div>
    <div id="body" name="body">
        <h2>My Cart</h2>
        <table id="myCarts" align="center" width="80%" border="1" name="myCarts">
            <tr>
                <th style="backgroud-color:#45E078">Product Name</th>
                <th style="backgroud-color:#45E078">Description</th>
                <th style="backgroud-color:#45E078">Unit Price</th>
                <th style="backgroud-color:#45E078">Quantity</th>
                <th style="backgroud-color:#45E078">Total</th>
            <tr>
            <tr>
                <td>Surf Excel</td>
                <td>Washing Powder</td>
                <td>85.00</td>
                <td><input type="number" id="item01" name="item01" onchange="calculateTotal('01')" value="1" /></td>
                <td><span id="total01">85.00</span></td>
            </tr>
            <tr>
                <td>Harpic</td>
                <td>Toilet Cleaner</td>
                <td>48.00</td>
                <td><input type="number" id="item02" name="item02" onchange="calculateTotal('02')" value="2" /></td>
                <td><span id="total02">96.00</span></td>
            </tr>
            <tr>
                <td>Lux</td>
                <td>Toilet Soap</td>
                <td>36.00</td>
                <td><input type="number" id="item03" name="item03" onchange="calculateTotal('03')" value="2" /></td>
                <td><span id="total03">72.00</span></td>
            </tr>
        </table>
        <div id="gtotal"></div>
        <button id="continue" style="backgroud-color:#FF0000">Continue Shopping</button>
        <button id="calculate" style="backgroud-color:#FF0000" onclick="calculateGrandTotal()">Calculate Total</button>


        <footer>
            <h4>(c) All rights reserved to Hindustan Liver 2018-2019</h4>
        </footer>
    </div>
</body>
</html>

index.js: (Hindusthan Liver) :
-----------------------------

function calculateTotal(id) {
    var n = "item" + id;
    var t = "total" + id;
    var x = document.getElementById(n).value;
    var total;
    if (n.localeCompare("item01") == 0)
        total = x * 85.00;
    else if (n.localeCompare("item02") == 0)
        total = x * 48.00;
    else
        total = x * 36.00;
    var s = total + ".00";
    document.getElementById(t).innerHTML = s;
}

function calculateGrandTotal() {
    var x1 = parseFloat(document.getElementById("total01").innerHTML);
    var x2 = parseFloat(document.getElementById("total02").innerHTML);
    var x3 = parseFloat(document.getElementById("total03").innerHTML);
    var total = x1 + x2 + x3;
    var s = total + ".00";
    document.getElementById("gtotal").innerHTML = s;
}


FAQs of BCG

These are the some FAQS of BCG PLEASE USE BELOW LINK Details and FAQS of BCG