Tuesday, January 29, 2019

Filter Design Pattern

Filter Design Pattern

Filter pattern or Criteria pattern is a design pattern that enables developers to filter a set of objects using different criteria and chaining them in a decoupled way through logical operations. This type of design pattern comes under structural pattern as this pattern combines multiple criteria to obtain single criteria.


Student.java




StudentCriteria.java 






FindAfterALs.java 



FindAfterOLs.java 




FindStudentTeachers.java




MainClass.java 



Output


Thursday, September 3, 2015

MySQL Using Terminal

1) Log into the MySQL Server

Command : mysql -u root -p
                

   Provide your root password & press enter.



2) Check available databases.

Command : show databases ;  (At the end, you must end the command using  " ; " )


3)Select one schema.

Command: use <schema name> ;
eg:- use ict_centre_schema;

 4) Check Available Tables in the DB

Command: show tables;


5) Describe a table

Command: desc <Table Name> ;
eg:- desc admin;



Friday, August 14, 2015

Useful Linux Commands.

What is "LINUX"

 Linux is an open-source operating system. Linus Torvalds built the core of the operating system, named as kernel (Linux Kernel)  in 1991. Linux has four major parts.
  • The Kernel
  • Supplied programs
  • The shell
  • X

Few commands.

1) cd :- Change your current directory.
 
     (a) cd [file_path]  (go to directory using path)
          eg: cd Documents/Education/


      (b) cd  [..]    (move back one directory)
           eg: cd ..

      (c) cd    (redirect to home)
           eg: cd


2) pwd :-Print current working directory using absolute path.

     eg: pwd


3) mkdir :-  Create directory or directories

       (a) mkdir [directory name] ( create directory in current directory)
            eg: mkdir directory_one
             *** Note: [ls -l] is long listing FILES


       (b) mkdir [directory_1 directory_2] (create more than one directory in current directory)
             eg: mkdir directory_1 directory_2

 
      (c) mkdir [<absolute path>/file_name] (create directory using absolute path)
           eg: mkdir /home/banuka/Documents/Education/directory_abc


4) rmdir :- Delete empty directory

       (a) rmdir [directory_name] (remove empty directory in current directory)
            eg: rmdir  directory_abc

     
       (b) rmdir [<absolute path>/file_name] (remove empty directory using absolute path)
           eg: rmdir /home/banuka/Documents/Education/directory_abc


5) rm -r :Delete nonempty directory

       (a) rm -r [Directory_name]  (remove nonempty directory in current directory)
            eg: rm -r Education


       (b) rm -r [<absolute path>/file_name] (remove nonempty directory using absolute path)
           eg: rm -r /home/banuka/Documents/Education