MQTT Broker with ionic 4 and angular 8 frameworks
Related links
1.Eclipse Paho - MQTT and MQTT-SN software
2.paho.mqtt.javascript/paho-mqtt.js at master · eclipse/paho.mqtt.javascript
Angular8 service
As long as the service is not created again, all the components can share the same service and its data.
1.RxMarbles: Interactive diagrams of Rx Observables
Ionic4 tutorial
4.Chart.js · Chart.js documentation
5.Ionicons
6.Theming in IONIC v4.x - Narendra Singh Rathore - Medium
Angular8 tutorial
1.Rxjs subject 2.Angular - ViewChild
Git
Cache git password with timeout
Typescript
2.TypeScript - Strings - Tutorialspoint
3.TypeScript - String split() - Tutorialspoint
4.javascript - Copy array items into another array - Stack Overflow
Use the host set up in uni through ssh connection
1.Run the command in terminal
ssh -L 8883:localhost:8883 username@barretts.ecs.vuw.ac.nz
2.Then open http://www.hivemq.com/demos/websocket-client/ in the browser, set host to localhost.
3.Connect to host, subscribe to swen325/a3 topic to get messages
Parse Date in typescript
Date.parse() - JavaScript | MDN
const time = "2019-10-13 18:00:10";
const time2 = "2019-10-13 18:10:10";
const parseTime = Date.parse(time);
const date = new Date(parseTime);
const date2 = new Date(Date.parse(time2));
console.log(date);
console.log(date2);
console.log(date2-date);
result:
> Sun Oct 13 2019 18:00:10 GMT+1300 (New Zealand Daylight Time)
> Sun Oct 13 2019 18:10:10 GMT+1300 (New Zealand Daylight Time)
> 600000
600000 in milliseconds