Posts

Showing posts from June, 2020

Node JS : ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client     at Handshake.Sequence._packetToError      at Socket.emit (events.js:311:20)     at addChunk (_stream_readable.js:294:12)     at readableAddChunk (_stream_readable.js:275:11)     at Socket.Readable.push (_stream_readable.js:209:10)     at TCP.onStreamRead (internal/stream_base_commons.js:186:23) Solution: (Run below commands in MySQL Workbench) ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; flush privileges;

Node JS - Project Structure | Boilerplate | Express Generator Utility

Usually developers work with the ready made project’s code provided in company which was created by someone else or developed long time back.  But When it comes to writing their own project from scratch, developer’s mind is looking for following questions.  What should I begin with?  How can I make it work well?  Why should I do this? In this article, I'll share some main tips about how to set a boilerplate for an API based on Express & how to use project structure which can be scalable over a period of time without any issues. REST API or Backend project which give data to various client such as Desktop, Web, Mobile app etc. You can use Express Generator Utility to start using out of the box boilerplate project structure and expand as per your need. Set up express-generator in your local machine and create the directory for your new project. npm install express-generator -g express <your-project-name> e.g. Open command prompt or Terminal tab in Visual...

Logs Cleaner Batch File

If you want to daily clean the server & applications logs then create below batch file to resolve repeated redundant deletion of logs task. Steps: 1. Create blank file as name "LOGS_CLEANER.bat" 2. Copy below highlighted red contents and paste into newly created file in step-1. :: Name : LOGS_CLEANER.bat :: Purpose : To execute all 'Start of day' tasks :: Author : Bhavin Patel :: Revision : 11-Jun-2020 - Initial version echo Hello %USERNAME%  echo deleting log files - DAILY_LOGS_CLEANER del "C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv04\logs\server1\*.*" /s /f /q del "C:\ECLIPSE_WORKSPACE\src\logs\*.*" /s /f /q echo Done! timeout /t 5 3. You can specify the path as per your working directory.

SVN Latest Batch File

Its easy to create WINDOW batch file to get latest committed code from SVN daily. Steps: 1. Create blank file as name "SVN_Update.bat" 2. Copy below highlighted red contents and paste into newly created file in step-1. :: Name : SVN_Update.bat :: Purpose : To execute all 'Start of day' tasks :: Author : Bhavin Patel :: Revision : 11-Jun-2020 - Initial version echo Hello %USERNAME%  svn update C:\SVN\branches\code\src timeout /t 5 3. Specified working local folder & Run the batch file to sync latest code from repository browser configured.

JAVA Interview Questions

What is OOPs? OOPs (Object-Oriented Programming) is a type of programming which is based on objects rather than just functions and procedures. Why use OOPs? OOPs allows clarity in programming. Code can be reused through inheritance Data and code are bound together by encapsulation OOPs allows data hiding, therefore, private data is kept confidential Problems can be divided into different parts making it simple to solve The concept of polymorphism gives flexibility to the program by allowing the entities to have multiple forms What are the main features of OOPs? Inheritance Encapsulation Polymorphism Data Abstraction Inheritance is a feature of OOPs which allows classes inherit common properties from other classes. Polymorphism refers to the ability to exist in multiple forms. Multiple definitions can be given to a single interface. Method overloading is a feature of OOPs which makes it possible to give the same name to more than one methods within a class if the arguments passed diffe...