This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pair<T,R> { | |
private T key; | |
private R value; | |
public Pair(T key, R value) { | |
this.key = key; | |
this.value = value; | |
} | |
public T getKey() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose') | |
const util = require('util') | |
const stream = require('stream') | |
const pipeline = util.promisify(stream.pipeline) | |
const stringify = require('csv-stringify') | |
const fs = require('fs') | |
const fsp = require('fs').promises | |
let schema = mongoose.Schema({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
// Update these with values suitable for your network. | |
const char* ssid = "SSID"; | |
const char* password = "password"; | |
const char* mqtt_server = "iot.eclipse.org"; | |
#define mqtt_port 1883 | |
#define MQTT_USER "mqtt username" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
// Update these with values suitable for your network. | |
const char* ssid = "SSID"; | |
const char* password = "passowrd"; | |
const char* mqtt_server = "iot.eclipse.org"; | |
#define mqtt_port 1883 | |
#define MQTT_USER "username" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include <PubSubClient.h> | |
// Update these with values suitable for your network. | |
const char* ssid = "SSID"; | |
const char* password = "password"; | |
const char* mqtt_server = "broker.mqtt-dashboard.com"; | |
#define mqtt_port 1883 | |
#define MQTT_USER "mqtt username" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include <PubSubClient.h> | |
#include <ArduinoJson.h> | |
// Update these with values suitable for your network. | |
const char* ssid = "SSID"; | |
const char* password = "PASSWORD"; | |
const char* mqtt_server = "iot.eclipse.org"; | |
#define mqtt_port 1883 | |
#define MQTT_USER "username" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include <PubSubClient.h> | |
// Update these with values suitable for your network. | |
const char* ssid = "SSID"; | |
const char* password = "pwd"; | |
const char* mqtt_server = "iot.eclipse.org"; | |
#define mqtt_port 1883 | |
#define MQTT_USER "username" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int id=99; | |
#include <SoftwareSerial.h> | |
SoftwareSerial sw(2, 3); // RX, TX | |
void setup() { | |
Serial.begin(115200); | |
Serial.println("Interfacfing arduino with nodemcu"); | |
sw.begin(115200); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.anhure.test3.test3android; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/task.h" | |
#include "freertos/queue.h" | |
QueueHandle_t q=NULL; | |
void consumer_task(void *pvParameter) | |
{ | |
unsigned long counter; |