Posts Tagged ‘javascript’
Practical coding questions answered by GPT3: is it ready for the prime time?
You can easily try GPT3 for yourself, simply register for an OpenAI account, and you will get (at the time of writing this) 18 USD of credit. Head on over to the following link: https://platform.openai.com/playground Here you can enter your question, and submit it. GPT3 will answer in the same text box. There are three…
Weiterlesenswitching from JSON to MsgPack in a backwards compatible manner with Paho MQTT (JavaScript)
picockpit.com makes heavy use of MQTT. For the upcoming version 2.0 I have decided to switch it to MsgPack. Why MsgPack? MsgPack (actually called MessagePack – packages tend to use MsgPack) is a binary format, aimed at compatibility with JSON, but decreasing file size (which is good for saving bandwidth & server resources). Another advantage:…
WeiterlesenEclipse Paho MQTT JavaScript Documentation
Unfortunately the official Eclipse page which you can easily find using Google does NOT link to the documentation proper (at least not as far as I can see it). The link to the documentation itself is this: https://www.eclipse.org/paho/files/jsdoc/Paho.MQTT.Client.html Happy coding.
WeiterlesenPaho MQTT Client (Javascript), Envoy, VerneMQ: debugging disconnects
After deploying picockpit to my server, a bug was observed: the web frontend would disconnect in very regular intervals. This had not been present on the local development environment. Users of picockpit reported the same bug. I have debugged it today, and applied a hotfix. It turns out it was a timing issue. TL;DR how…
WeiterlesenPaho failure to subscribe
Problem AMQJS0005E Internal error. Error Message: Cannot read property ‘show’ of undefined This error is shown sporadically, especially when you Shift-Reload the whole page. Solution I have a Vue.js Plugin to show “toast” messages (Vue.toasted). I currently use it for debugging purposes. Everything worked fine initially, as my code was executed after Vue was initialized…
Weiterlesenenvoy websockets per route configuration, JavaScript test setup
In my article yesterday I discussed the configuration & test of envoy for proxying websockets at length. Today I would like to add some additional information. correct syntax for websocket upgrade per route You can enable websocket upgrade per route. No need to add it globally: – name: envoy.http_connection_manager config: #upgrade_configs: # – upgrade_type: websocket …
Weiterlesencorrect way to instantiate Paho Client in JavaScript for wss (secure websocket)
The Paho documentation is unfortunately quite fragmented at the moment, and some links on Eclipse’s website do not work. Here are some working links (as of 05/2019): https://www.eclipse.org/paho/clients/js/ https://www.eclipse.org/paho/files/jsdoc/index.html https://github.com/eclipse/paho.mqtt.javascript And here’s a fantastic website by Steve: http://www.steves-internet-guide.com/using-javascript-mqtt-client-websockets/ There is an important breaking change in the Paho namespace, where you will run into trouble using…
Weiterlesen