Posts

Setup Kafka In Macos

OS : MacOS Sonoma - Silicon Chip Date: 26-April-2025 Install: brew install kafka Start Kafka To start kafka now and restart at login:   brew services start kafka Or, if you don't want/need a background service you can just run:   /opt/homebrew/opt/kafka/bin/kafka-server-start /opt/homebrew/etc/kafka/server.properties Create Topic vishesh@visheshs-MacBook-Pro bin % /opt/homebrew/opt/kafka/bin/kafka-topics --create --topic test-topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1 Created topic test-topic. Verify Topic creation vishesh@visheshs-MacBook-Pro bin % /opt/homebrew/opt/kafka/bin/kafka-topics --list --bootstrap-server localhost:9092 test-topic Sending Producer mauli@maulis-MacBook-Pro  bin % /opt/homebrew/opt/kafka/bin/kafka-console-producer --bootstrap-server localhost:9092 --topic test-topic >Hello Mauli >$(date) >`date` >Its fun mauli@maulis-MacBook-Pro  bin % echo "Trying to send Message to topic using Pipe Symbol with ...

S.O.L.I.D.

 Solid Principal Aims at designing application architecture in such a way so any new change made to application will not induce any defect S - Single Responsibility O - Open and Close Principal  - Abstract class could be extended without breaking or changing existing code L - Liskov Substitution Principle - Ensure subclass follow contract of parent class using Inheritence. I - Interface Segregation Principal - Use Mulitple Interfaces instead of Single Large Interface D - Dependency Inversion Principal - Use Dependency Injection and Interfaces to Depend on Abstraction. Example to demonstrate Liskov abstract class Vehicle {     abstract void start(); } class Car extends Vehicle {     @Override     void start() {         System.out.println("Car is starting...");     } } public class Main {     public static void main(String[] args) {         Vehicle myCar = new Car();       ...

Welcome to Malaysia: The What Why and How of Malaysian Expreience

Malaysia: Budget, Expenses, And Much More(A Complete Guide ) Hello Everyone, especially Expats. I hope you are looking for an article that can guide you through the basic and advanced level of living expenses in Malaysia if you are looking forward to coming and settling here for the long or short term. I am also an expat living in Malaysia for over a year now and become quite familiar with everything here. first of all, here are some basic historical and fun facts about Malaysia as you should always know the country before you start living there. a) on 31st august 1957,Malaysia got independence from bristishers(of course). In 1963, independent Malaya was united with the then-British colonies of North Borneo, Sarawak, and Singapore to form Malaysia. but in August 1965, Singapore was expelled from the union and became an independent separate country. b) As of today Malaysia is a federation of 13 states and 3 federal territories in Southeast Asia. It consists of 2 regions separated by the...

Install jdk on Macbook MacOS M2

Published : 21st Dec 2022  OS version: MacOS 13.0.1 (22A400) - Ventura Architecture: Silicon chip - M2 

NG0303: Can't bind to 'child_variable' since it isn't a known property of 'child-component'.

Image
NG0303: Can't bind to 'labels_value' since it isn't a known property of 'app-line-chart'. Any idea how this error occured? Origin: <td><app-line-chart [labels_value]="lineChartdata" >loading</app-line-chart></td> Here we have a variable "labels_value" that is missing in the component of selector "app-line-chart". Solution: Need to add in child component, LineChartComponent in this case, declaring the selector "app-line-chart" @Input()   labels_value: any; Solution done!

Angular Pie Chart

Image
To start implementing, visit the below link:  https://www.npmjs.com/package/ng2-charts/v/3.0.0-rc.2 and follow the instructions it mentions, going with the flow I will show you how it impacts your projects File structure: You can install ng2-charts using npm npm install ng2-charts@next --save Effect: Two folders gets added to node_modules You need to install and include Chart.js library in your application (it is a peer dependency of this library) (more info can be found in the official chart.js documentation) npm install chart.js --save API Import import { ChartsModule } from 'ng2-charts'; // In your App's module: imports: [    ChartsModule ] Chart types There is one directive for all chart types: baseChart, and there are 8 types of charts: line, bar, radar, pie, polarArea, doughnut, bubble and scatter.  

Angular environment file infomation in angular.json

 fileReplacements": [                 {                   "replace": "src/environments/environment.ts",                   "with": "src/environments/environment.prod.ts"                 }