Posts

Showing posts from January, 2020

jaaavaaaa .. interview ... sup

Image
.........JAVA INTERVIEW ............. https://www.youtube.com/user/naveenanimation20 CASTING OPERATIONS ,  INT TO OTHER int to byte Java AFTER KNOWING  PRIMITIVE DATA TYPES  AND JAVA RULES OF  DATA TYPE CASTING (TYPE CONVERSION) , LET US CAST INT TO BYTE. The byte takes 1 byte of memory and int takes 4 bytes of memory. Assigning 4 bytes of memory to 1 byte of memory requires explicit casting. byte –> short –> int –> long –> float –> double The left-side value can be assigned to any right-side value and is done implicitly. The reverse like  int to byte  requires explicit casting. Examples of implicit casting int x = 10; long y = x; byte x = 10; int y = x; FOLLOWING PROGRAM ON INT TO BYTE EXPLAINS EXPLICIT CASTING, OBSERVE JAVA STYLE OF EXPLICIT CASTING. Java 1 2 3 4 5 6 7 8 9 10 11 12 13 public class Conversions {    public s...

RESTful Web Services With Python Flask

Image
The idea of this post is to describe how to develop a RESTful Web Services in Python. RESTful Web Service is an architectural style, where the data or the structural components of a system is described  in the form of URI ( Uniform Resource Identifier) and the behaviors are described in terms of methods. The resources can be manipulated using CRUD (Create, Read, Update and Delete) operations. The communication protocol for REST is HTTP since it suits the architecture requirement of being a stateless communication across the Client and Server. There are many frameworks available in Python for web development, but Django (pronounced as yango) and Flask stands out of the crowd being a full stack frameworks. I prefer Flask framework since it is very small and easy to learn for beginners, whereas Django is too big for beginners. 1. The Plan In this exercise, we will create an in-memory JSON DB to store and manipulate a simple employee database and develop RESTful APIs to p...