I hereby claim:
- I am jpwsutton on github.
- I am jsutton (https://keybase.io/jsutton) on keybase.
- I have a public key ASDkSwirSkrdxpkIDRbs7euFgnNf0q96P6m-aACVdUilBgo
To claim this, I am signing this object:
| // The received message is stored in 'msg' | |
| // It will have at least a 'payload' property: | |
| // console.log(msg.payload); | |
| // The 'context' object is available to store state | |
| // between invocations of the function | |
| // context = {}; | |
| var date = new Date().toISOString().slice(0, 19).replace('T', ' '); | |
| var user = 'james'; | |
| function isNumber(object){ | |
| return ! isNaN (object-0) && object !== null && object !== "" && object !== false; | |
| } |
| // There is probably a nicer way of doing this... | |
| function propertyInObject(property, object){ | |
| try { | |
| if(property in object){ | |
| return true; | |
| } | |
| } catch (e) { | |
| return false; | |
| } | |
| } |
I hereby claim:
To claim this, I am signing this object:
| #define WARN Serial.println | |
| #define MQTTCLIENT_QOS2 1 | |
| #include <ESP8266WiFi.h> | |
| #include <IPStack.h> | |
| #include <Countdown.h> | |
| #include <MQTTClient.h> | |
| int arrivedcount = 0; |
| private void printByteArray(byte[] bytes){ | |
| for (byte b1 : bytes){ | |
| String s1 = String.format("%8s", Integer.toBinaryString(b1 & 0xFF)).replace(' ', '0'); | |
| s1 += " " + Integer.toHexString(b1); | |
| s1 += " " + b1; | |
| System.out.println(s1); | |
| } | |
| } |
| <html> | |
| <head> | |
| <title>Eclipse Paho MQTT JavaScript Client Example</title> | |
| <!-- Source Paho MQTT Client--> | |
| <script src="../src/paho-mqtt.js"></script> | |
| <!--<script src="../src/paho-mqtt.js"></script>--> | |
| <!-- Utility Javascript --> | |
| <script src="example.js"></script> |
| "City (en)";"City (de)";"Country (en)";"Country (de)";"Country code";"Population";"Latitude";"Longitude" | |
| "Shanghai";"Shanghai";"China";"China";"CN";22315500;31.22222;121.45806 | |
| "Karachi";"Karachi";"Pakistan";"Pakistan";"PK";13052000;24.9056;67.0822 | |
| "Mumbai";"Mumbai";"India";"Indien";"IN";12691800;19.07283;72.88261 | |
| "Beijing";"Peking";"China";"China";"CN";11716600;39.9075;116.39723 | |
| "Istanbul";"Istanbul";"Turkey";"Türkei";"TR";11174300;41.01384;28.94966 | |
| "Guangzhou";"Guangzhou";"China";"China";"CN";11071400;23.11667;113.25 | |
| "Delhi";"Delhi";"India";"Indien";"IN";10928000;28.65195;77.23149 | |
| "Lagos";"Lagos";"Nigeria";"Nigeria";"NG";10404100;6.45407;3.39467 | |
| "Moscow";"Moskau";"Russia";"Russland";"RU";10381200;55.75222;37.61556 |