Flutter error with Xcode : Connecting to the VM Service is taking longer than expected

I’ve faced the flutter error “Connecting to the VM service taking longer than expected” several times during developing flutter apps. This seems to be a common error and more information can be obtained from the Xcode logs about the exact error message.   This is how the error looks :   Connecting to the VM […]

Flutter Least Common Multiple (LCM)

For finding LCM, we need to use the gcd function that Dart provides :   int gcd(int other); LCM can be calculated as follows: int getLCM(int a, int b) {   return (a * b) ~/ gcd(a, b); } Here is the complete code : void main() {   int a = 10, b = 25;   int […]

20+ AWS Certified Solution Architect Associate Exam Questions

In this post, we will cover AWS Certified Solution Architect Associate Exam Questions. The following set of questions is to help you test your understanding before appearing for the AWS solution architect associate exam. This is no way a replacement for practical experience.   Q1 : Which of the following is NOT an AWS Compute […]

Angular ngIf example

Using ngIf to conditionally display app.component.ts import { Component } from '@angular/core'; @Component({   selector: 'app-root',   templateUrl: './app.component.html',   styleUrls: ['./app.component.less'] }) export class AppComponent {   name = "John"; } app.component.html <div>   <h1>     <div *ngIf="name">Hello {{name}}</div>   </h1> </div>   Using ngIf with custom objects fruit.ts export class Fruit {     constructor(public id: number,     public name: string){ } } […]

When to use PathParam and when to use QueryParam

In this article, we will see difference between PathParam and QueryParam and how to decide whether to use PathParam vs QueryParam in rest api design.   Diff between PathParam and QueryParam Path params are part of the url where as query parameters are added after the ? mark symbol and separated from other query parameters […]