Wednesday 25 April 2018

Update Column With Random predefined word list in PostgreSQL


   Update Column With Random  enum word list in PostgreSQL ?
   How to Update Column With Random word ?

    UPDATE stock
    SET shape = (
              (
               ARRAY['CS','CM','RN','EM','AS','PR','OV','HT','BG','Round','MQ','PC']
              )          [floor(random()*12)+1]
           );

Update Date Column With RANDOM date in PostgreSQL



Random Dates and Numbers in PostgreSQL with the RANDOM() Function



select NOW() + (random() * (NOW()+'90 days' - NOW())) + '30 days';

UPDATE stock SET trans_date = NOW() + (random() * (NOW()+'90 days' - NOW())) + '30 days';



Monday 23 April 2018

How to Flush/Clean DNS cache in Ubuntu 16.04 and Ubuntu 20.04



In Windows, we useipconfig /flushdnsin Ubuntu 16.04  run this command to flush dns cache:
sudo /etc/init.d/dns-clean restart

or use:

sudo /etc/init.d/networking force-reload


Ubuntu 20.04 

How to Clear DNS Cache on Ubuntu?

We can run the following command to clear the DNS cache on Ubuntu.

 sudo systemd-resolve --flush-caches



Friday 13 April 2018

SURAT: India's first district cooperative bank built on the green concept

 SURAT: India's first district cooperative bank built on the green concept will be inaugurated in the diamond city by Chief Minister Vijay Rupani on Friday
Established in 1909, the 109-year-old Surat district cooperative bank  has become the first among the 370 district banks in India and 18 district banks in Gujarat for constructing its new headquarter in the diamond city’s Majura Gate on the green building concept. Constructed on 45,000 square feet, the bank took just 15 months for completition at the cost of Rs 34 crore.


The terrace of the district bank is installed with rooftop solar plant for generating 36 kilowatts of electricity for its in-house needs. The solar panels have been so designed that the electricity requirements would be met even during the monsoon season.

The five-storey bank building has green patches for gardening at each of the floors. The entry of the building has a green landscape with lush garden for providing a different feeling to the customers visiting the bank. Each floor has the facility of toilets and reception, mineral RO plants for clean drinking water etc.

Watch a New Surat district cooperative bank in 360 degree.


SURAT district cooperative bank entrance gate