Posts

Comparison of Cloud Services

Comparison of services of AWS, Azure and GCP AWS Azure GCP EC2 Virtual Machines Compute Engine S3 Blob Storage Storage EC2 Container Service Container Service Kubernetes Engine Elastic Beanstalk Azure App Service App Engine Dynomo DB Cosmos DB Cloud Datastore RDS SQL Database BigQuery Lambda Azure Functions Cloud Functions

Kubernetes vs. Docker : Real meaning?

“Kubernetes vs. Docker” is a phrase that we hear more and more as Kubernetes becomes more popular as a container orchestration solution. Docker and Kubernetes aren’t direct competitors. "Kubernetes vs. Docker Swarm" are in the completion The rise of use of Docker Containers and container platforms provide more advantages over virtualization. Isolation of resources is done on the kernel level without the need for a guest operating system, so containers are much more efficient, fast, and lightweight. Which allows applications to become encapsulated in self-contained environments which has advantages, such as quicker deployments, scalability and reduced equality between development environments. Docker is currently the most popular container platform.  Docker has the Docker Engine, which is a run-time and allows you to build and run containers. The rise of Orchestration Systems While Docker provided an open standard for packaging and distributing contai

Embed Swing control into SWT composite

For this requirement, we need an SWT_AWT bridge to create EmbeddedFrame which will be used to add Swing Controls. Sample Code: JLabel label = new JLabel("sample label"); Composite composite = new Composite(shell, SWT.EMBEDDED); Frame frame = SWT_AWT.new_Frame(composite); frame.setLayout(new BorderLayout()); frame.add(label,BorderLayout.CENTER);

Code to scale JFace/SWT image

Please find the code below ImageDescriptor scaleImage(Display display, ImageDescriptor imageDescriptor, int outMaxWidth, int outMaxHeight) { if (imageDescriptor == null) { return null; } ImageData imageData = imageDescriptor.getImageData(); if (imageData == null) { return imageDescriptor; } int newHeight = outMaxHeight; int newWidth = (imageData.width * newHeight) / imageData.height; if (newWidth > outMaxWidth) { newWidth = outMaxWidth; newHeight = (imageData.height * newWidth) / imageData.width; } // Use GC.drawImage Image outImage = new Image(display, newWidth, newHeight); GC gc = new GC(outImage); Image oldImage = imageDescriptor.createImage(); gc.drawImage(oldImage, 0, 0, imageData.width, imageData.height,

How to make Eclipse e4 RCP App Full-screen and Trimless

Image
To make your Eclipse e4 RCP App full-screen and trimless then you need to find your TrimmedWindow element in Windows & Dialog section of Application.e4xmi file. Add the tag shellMaximized and the persistentState value styleOverride to 8.

Find out a monitor’s size / resolution in Eclipse SWT

For Single Monitor : @Inject @Optional public void receiveActiveShell(@Named(IServiceConstants.ACTIVE_SHELL) final Shell shell) { if (shell != null) { final Display display = shell.getDisplay(); final Rectangle screenSize = display.getBounds(); final Point size = shell.getSize(); shell.setLocation((int) (screenSize.width - size.x) / 2, (int) (screenSize.height - size.y) / 2); } } For Multi Monitor : Monitor[] monitors = getShell().getDisplay().getMonitors(); Monitor activeMonitor = null; Rectangle rect = shell.getBounds(); for (int i = 0; i < monitors.length; i++) { if (monitors[i].getBounds().intersects(rect)) { activeMonitor = monitors[i]; } } System.out.println("The resolution of the active monitor is " + activeMonitor.getBounds().width + " x " + activeMonitor.getBounds().height);

VMware Virtual Machine Operations

VMware Virtual Machine Operations For these operations I used VI java as library: SourceCode: package com.shashwat.vijava;   import java.net.URL; import java.util.Scanner; import com.vmware.vim25.mo.Folder; import com.vmware.vim25.mo.InventoryNavigator; import com.vmware.vim25.mo.ServiceInstance; import com.vmware.vim25.mo.Task; import com.vmware.vim25.mo.VirtualMachine; public class VMPowerOps { @SuppressWarnings("deprecation") public static void main(String[] args) throws Exception { String address, userName, password, vmName, operation; Scanner scanner = new Scanner(System.in); System.out.println("Enter vCenter or ESXi IP address ?"); address = scanner.nextLine(); System.out.println("Enter username of " + address + " ?"); userName = scanner.nextLine(); System.out.println("Enter password of " + addr